不用两个数组
class Program
{
static void Main(string[] args)
{
int[,] score ={
{1,89},{2,90},{3,98}
};
for (int a = 0; a < score.GetLongLength(0); a++)
{
if (score[a, 1] > 90)
{
switch (score[a, 0])
{
case 1:
Console.Write("分数最高的是吴松,分数:" + score[a, 1]); break;
case 2:
Console.Write("分数最高的是钱振宇,分数:" + score[a, 1]); break;
case 3:
Console.Write("分数最高的是伏晨,分数:" + score[a, 1]); break;
}
}
}
}
}
}