string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = new int[] { 89, 90, 98, 56, 60, 91, 93, 85 };
int max;
int index = 0;
max = score[0];
for (int i = 1; i < score.Length; i++)
{
if (score[i] > max)
{
max = score[i];
index = i;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}", name[index], max);
max没有值 if语句直接比较?