最新回答 / 慕体303
可是我的编译器会显示错误啊,再说,慕课里的同学代码是没有错误的代码才可以显示上去的,你的不错就行了。有一些可能是大神写的,加入了一写别的话但你也不能说别人的是错的啊,而且,我参照同学代码里的来写,都正确了
2015-10-13
注意:下面的评论中 数组string[,] score = new string[,]{ }中元素没有写,还有打印语句Console.WriteLine("分数最高的是{0},分数是{1}",name,max);没写,因为评论写不下了。
2015-10-12
string[,] score = new string[,]{ }
int max = Convert.ToInt32(score[0, 1]);
string name = null ;
for (int i = 0; i < score.GetLongLength(1); i++)
{ if (Convert.ToInt32(score[i, 1]) > max)
{max = Convert.ToInt32(score[i, 1]);
name = score[i, 0]; }}
int max = Convert.ToInt32(score[0, 1]);
string name = null ;
for (int i = 0; i < score.GetLongLength(1); i++)
{ if (Convert.ToInt32(score[i, 1]) > max)
{max = Convert.ToInt32(score[i, 1]);
name = score[i, 0]; }}
2015-10-12