運行成功, 輸出錯誤是為什么?
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);
2023-12-01
那個逗號