为了账号安全,请及时绑定邮箱和手机立即绑定

只用前面学过的知识点

string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };

            int[] score = new int[] { 89, 90, 98, 56, 60, 91, 93, 85 };


            int maxscore = score[0];

            string topname = name[0];



            for (int i = 0; i < score.Length; i++)

            {

                if (score[i] > maxscore)

                {

                    maxscore = score[i];


                    topname = name[i];


                }

            }

            Console.WriteLine("分数最高的是{0}" + "," + "分数是{1}", topname, maxscore);


正在回答

举报

0/150
提交
取消

只用前面学过的知识点

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号