qq_慕慕8252154
2019-08-19 15:18
string[,] name = {{"吴松","89"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"杜日鹏","91"},{"何昆","93"},{"关欣","85"}};
int max = 0;
int index = 0;
for(int i = 0;i<name.Length/2;i++){
if(max>int.Parse(name[i,1])){
max = max;
}else{
max = int.Parse(name[i,1]);
index = i;
}
}
Console.Write("分数最高的是{0},分数是{1}",name[index,0],max);
max = max;
最好是换成 max=int.Parse(name[i,1])
C#开发轻松入门
254118 学习 · 1459 问题
相似问题