這個答案有問題啊,正確答案應該是
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y -= 2;
Console.WriteLine(x);
Console.WriteLine(y);
Console.WriteLine(x - y);
}
}
}
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y -= 2;
Console.WriteLine(x);
Console.WriteLine(y);
Console.WriteLine(x - y);
}
}
}
2018-10-22
代码改为console.writeline((int)x>=y);或者console.writeline((double)x>y);两种方式都是可以的
2018-10-19
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if(x>=y)
break;
}
Console.WriteLine();//换行
}
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if(x>=y)
break;
}
Console.WriteLine();//换行
}
2018-10-14