weixin_慕数据8226140
2023-10-03 17:16
string[] names = new string[]{"吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣"};
int[] scores = new int[]{ 89, 90, 98, 56, 60, 91, 93, 85 };
int highScores = scores[0];
string highScorer = names[0];
for (int i = 0; i < scores.Length; i++)
{
if (scores[i] > highScores)
{
highScores = scores[i];
highScorer = names[i];
}
}
Console.WriteLine("分数最高的是" + highScorer + ", 分数是," + highScores);
那个逗号
C#开发轻松入门
254117 学习 · 1459 问题
相似问题