string[,] data = {{"钱东禹","90"}, {"伏晨", "98"}, {"陈路","56"}};
int tsorc = 0;
string tname = "";
for (int i = 0; i < data.GetLongLength(0); i++)
{
string name = data[i, 0];
int fs = int.Parse(data[i, 1]);
if (tsorc < fs)
{
tsorc = fs;
tname = name;
}
}
Console.Write("分数最高的是" + tname + ",分数是" + tsorc);
int tsorc = 0;
string tname = "";
for (int i = 0; i < data.GetLongLength(0); i++)
{
string name = data[i, 0];
int fs = int.Parse(data[i, 1]);
if (tsorc < fs)
{
tsorc = fs;
tname = name;
}
}
Console.Write("分数最高的是" + tname + ",分数是" + tsorc);
string[,] data = { { "吴松", "89" }, { "伏晨", "98" }, { "陈路","56"}};
int tsorc = 0;
string tname = "";
for (int i= 0; i<data.GetLongLength(0); i++)
{
string name = data[i, 0];
int fs = int.Parse(data[i, 1]);
if(tsorc< fs)
{
tsorc = fs;
tname = name;
}
}
Console.Write("最高分数是:" + tname + ",分数:" + tsorc);
int tsorc = 0;
string tname = "";
for (int i= 0; i<data.GetLongLength(0); i++)
{
string name = data[i, 0];
int fs = int.Parse(data[i, 1]);
if(tsorc< fs)
{
tsorc = fs;
tname = name;
}
}
Console.Write("最高分数是:" + tname + ",分数:" + tsorc);