入江直树
2016-08-02 16:35
string[] names={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏" ,"何昆","关欣"};
int[] score={89,90,98,56,60,91,93,85};
int max=0;
for(int i=j= 0;i<score.Length;i++)
{
if(score[i]>max)
{
max = score[i];
j=i;
}
}
Console.Write("分数最高的是{0},分数是{1}", names[j],max );
没有i=j=0这种写法,分开写
C#开发轻松入门
254118 学习 · 1459 问题
相似问题