using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
int[] fenshu=new int[] {89,90,98,56,60,91,83,85};
string[] name=new string[] {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int max=fenshu[0];
string k;
int j=0;
for(i=0;i<fenshu.Length;i++)
{
if(fenshu[i]>max)
{
fenshu[i]=max;
j=i;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}"name[j],fenshu[j]);
}
}
}
fenshu[i]=max;应该是max=fenshu[i];而且,i应该从1开始循环就行了