string[] names = new string[]{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] scores = {89,90,98,56,60,91,93,85};
int max = 0;
string name = "";
for(int i=0;i<scores.Length;i++){
if(scores[i]>max){
max = scores[i];
name = names[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",name, max);
int[] scores = {89,90,98,56,60,91,93,85};
int max = 0;
string name = "";
for(int i=0;i<scores.Length;i++){
if(scores[i]>max){
max = scores[i];
name = names[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",name, max);
不要相信这道题下面评论说是3的,如果是3,这完全违反了数学原理,这就是你们为何一直提交不到,这才是正确的代码。 double d = 2.5; double x= d + 1; Console.WriteLine(x);
2017-10-23