int y = 5;
while (y >=1)//请输入
{
Console.Write(y+" ");
y--;//请输入
}
while (y >=1)//请输入
{
Console.Write(y+" ");
y--;//请输入
}
2018-03-31
int y = 5;
while (y<=5&&y>0)//请输入
{
Console.Write(y+" ");
--y;//请输入
}
while (y<=5&&y>0)//请输入
{
Console.Write(y+" ");
--y;//请输入
}
2018-03-30
string[] names=new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score=new int[]{89,90,98,56,60,91,93,85};
int temp=0,max=score[0];
for(int i=1;i<score.Length;i++)
if(max<score[i])
{max=score[i];temp=i;}
Console.Write("分数最高的是{0},分数是{1}",names[temp],max);
int[] score=new int[]{89,90,98,56,60,91,93,85};
int temp=0,max=score[0];
for(int i=1;i<score.Length;i++)
if(max<score[i])
{max=score[i];temp=i;}
Console.Write("分数最高的是{0},分数是{1}",names[temp],max);