int y = 5;
while (y<=5&&y>0)//请输入
{
Console.Write(y+" ");
//请输入
y--;
}
while (y<=5&&y>0)//请输入
{
Console.Write(y+" ");
//请输入
y--;
}
2018-09-24
string[] name={"吴松","钱东宇","伏晨","陈陆","周茹","林日鹏","何昆","关欣"};
int[]score={89,90,98,56,60,91,93,85};
int Max;
Max=score[0];
int index=0;
for(int i=1;i<score.Length;i++)
{
if(score[i]>Max)
{
Max=score[i];
index=i;
}
}
Console.WriteLine ("分数最高的是" + name[index] + ",分数是" + Max);
int[]score={89,90,98,56,60,91,93,85};
int Max;
Max=score[0];
int index=0;
for(int i=1;i<score.Length;i++)
{
if(score[i]>Max)
{
Max=score[i];
index=i;
}
}
Console.WriteLine ("分数最高的是" + name[index] + ",分数是" + Max);
string text = (year%=4) == 0 ?"闰年":"平年";括号的妙用,加上了就好理解了
2018-09-16