为什么把max6=num[p]; 去掉,答案就是 何昆?
int p,k,max6;
string[] name=new string[]{"吴松","钱东宇","伏晨","陈陆","周薇","林日鹏","何昆","关欣"};
int[] num=new int[]{89,90,98,56,60,91,93,85};
k=0;
max6=num[1];
for(p=1;p<num.Length;p++)
{
if(num[p]>max6)
{
//max6=num[p];
k=p;
}
}
Console.WriteLine("分数最高的是{0},分数是{1}", name [k],num[k]);