同学笔记中的“一缕火光焚燎原”明显是错误的代码,为什么还有那么多人点赞。
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y *= 2;
Console.WriteLine(x-y);
这代码输出的是0,不是4!
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y *= 2;
Console.WriteLine(x-y);
这代码输出的是0,不是4!
2019-10-16
for(int y=1;y<=7;y++){
for(int x=1;x<=7;x++){
if(x==y||x+y==8){
Console.Write("o");
}else{
Console.Write(".");
}
}
Console.WriteLine(" ");
}
for(int x=1;x<=7;x++){
if(x==y||x+y==8){
Console.Write("o");
}else{
Console.Write(".");
}
}
Console.WriteLine(" ");
}
int i = 1;int u = 7;
for (int a = 1; a <= 7; a++)
{for (int b = 1; b <= 7; b++)
{if (b == i || b == u)
Console.Write("O");
else
Console.Write(".");
}
i++;u--;
Console.WriteLine();}
for (int a = 1; a <= 7; a++)
{for (int b = 1; b <= 7; b++)
{if (b == i || b == u)
Console.Write("O");
else
Console.Write(".");
}
i++;u--;
Console.WriteLine();}