明明都已经一样的代码了,为何还是不通过,看不出问题在哪
string[] name={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[]score={89,90,98,56,60,91,93,85};
int max=score[0];
string topName=null;
for(int i=0;i<score.Length;i++)
{
if(score[i]>max)
{
max=score[i];
topName=name[i];
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",topName,max);