问答详情
源自:6-1 练习题目

运行成功, 输出错误是为什么?

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);


提问者:weixin_慕数据8226140 2023-10-03 17:16

个回答

  • 穿山甲1031
    2023-12-01 15:06:46

    https://img1.sycdn.imooc.com/656985e900013eda02840053.jpg

    那个逗号