各位大佬请帮我简化下我的代码,感觉有些复杂
static void Main(string[] args)
{
//声明 两组数组 ;
int[] score =new int[]{89,90,98,86,60,91,93,85};
string[] name = new string []{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
//声明 分数中的 最大值;
int max = score[0];
//判断出了最大的分数;
for (int i =0;i<score.Length;i++)
{
max =max>score[i]?max:score[i];
}
//现在要判断出分数的拥有者,即分数在数组中的具体位置
for(int j = 0;j<score.Length;j++)
{
if(max == score[j])
{
Console.Write("分数最高的是"+ name[j]+ ",分数是"+max);
}
}
}