我在VS上运算成功,在这里为什么不行?
static void Main(string[] args)
{
int max =0;
string[] names = { "吴松", "钱东宇", "伏晨","陈陆","周蕊","林日鹏","何昆","关欣" };
int[] score = { 89, 90, 98,56,60,91,93,85 };
for(int x=0;x<score.Length;x++)
{
if (score[x]>score[max])
{
max++;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}",names[max],score[max]);
}