最新回答 / qq_慕运维0487080
嗯,就是这样所以赋值运算符必须从右向左计算运算符计算X=Y=2(X和Y的值都是2)X/=0.5(X=X/0.5,X=4)Y%=2(Y=Y%2,Y=0)输出X-Y=4(4-0=4)还没明白就扔一边别管了,记死赋值运算符从右向左计算
2018-01-22
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y -= 2;
Console.WriteLine(x-y);
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y -= 2;
Console.WriteLine(x-y);
2018-01-22
int[] score = new int[]{89,90,98,56,60,91,93,85};
int k=0;
for(int i=1;i<score.Length;i++)
{
if(score[k]<=score[i])
k=i;
}
Console.Write(,score[k]);
int k=0;
for(int i=1;i<score.Length;i++)
{
if(score[k]<=score[i])
k=i;
}
Console.Write(,score[k]);
2018-01-22