太迷了,哪位大佬帮我看看
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);
分数前的逗号是中文状态下输入的全角!
打印的最后多了个逗号,而且中间那个逗号应该是中文逗号