using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { string [] name = new string[8] {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"}; int[] score=new int[8]{89,90,98,56,60,91,93,85}; int temp=0; int x = 0; for (int i = 1; i < score.Length; i++) { if (score[i] > temp) { temp = score[i]; x = i; } } Console.Write("分数最高的是{0},分数是{1}",name[x],temp); Console.WriteLine(); } }}
4 回答
qq_对我而言可爱的你_04181735
TA贡献1条经验 获得超1个赞
VS上运行是对的,那逻辑就没什么问题。你看看是不是标点符号(分中文、英文),或者空格不符合题目要求。其实这都不重要,VS运行OK就可以了
- 4 回答
- 0 关注
- 1312 浏览
添加回答
举报
0/150
提交
取消