如上图所示,这,如何作答?????
string[,] sor=new string[,]
{{"吴松","89"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何昆","93"},{"关欣","85"} };
//Console.WriteLine(sor.GetLength(0));
int Q = 0;
for (int i = 0; i < sor.GetLength(0)-1; i++)
{
if (int.Parse(sor[i, 1]) > Q)
{
Q=int.Parse(sor[i, 1]);
}
}
for (int i = 0; i < sor.GetLength(0); i++)
{
if (Q==int.Parse(sor[i,1]))
{
Console.WriteLine("分数最高的是" + sor[i, 0] + ",分数是" + sor[i, 1]);
}
}
姓名和分数