嗯。。。。有点迷。运行成功,输出错误
太迷了,哪位大佬帮我看看
太迷了,哪位大佬帮我看看
2020-07-24
string[,] sor=new string[,]
{{"吴松","89"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何昆","93"},{"关欣","85"} };
//Console.WriteLine(sor.GetLength(0));
int Max = 0;
string Name="";
for (int i = 0; i < sor.GetLength(0)-1; i++)
{
if (int.Parse(sor[i, 1]) > Max)
{
Max = int.Parse(sor[i, 1]);
Name = sor[i, 0];
}
}
Console.WriteLine("分数最高的是" + Name + ",分数是" + Max);
分数前的逗号是中文状态下输入的全角!
举报