qq_慕少0292954
2020-07-30 08:57
如上图所示,这,如何作答?????
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]);
}
}
姓名和分数
C#开发轻松入门
254117 学习 · 1459 问题
相似问题