Coding青天
2017-03-29 15:57
string[] names = new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] scores = new int[]{89,90,98,56,60,91,93,85};
int t=0;
int max=scores[0];
for(int i=1;i<scores.Length;i++)
{
if (max < scores[i])
{
max = scores[i];
t=i;
}
}
Console.WriteLine("分数最高的是" + names[t]+",分数是"+max);
把最下面一行的分数是前面的逗号用中文逗号,
C#开发轻松入门
254118 学习 · 1459 问题
相似问题