int temp =0;
string names =null;
string[] name={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何坤","关欣"};
int[] score ={89,90,98,56,60,91,93,85 };
for(int i=0;i<name.Length; i++){
for(int j=0;j<i;j++){
if(temp<score[i]){
temp = score[i];
names = name[i];
}
}
}
Console.WriteLine("分数最高的是{0},分数是{1}", names, temp);
string names =null;
string[] name={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何坤","关欣"};
int[] score ={89,90,98,56,60,91,93,85 };
for(int i=0;i<name.Length; i++){
for(int j=0;j<i;j++){
if(temp<score[i]){
temp = score[i];
names = name[i];
}
}
}
Console.WriteLine("分数最高的是{0},分数是{1}", names, temp);
for (int i=0;i<8;i++)
{
if (Convert.ToInt16(info[i,1])>maxScore)
{
maxName=info[i,0].toString();
maxScore=Convert.ToInt16(info[i,1]);
}
}
Console.Write("分数最高的是{0},分数是{1}",maxName, maxScore);
{
if (Convert.ToInt16(info[i,1])>maxScore)
{
maxName=info[i,0].toString();
maxScore=Convert.ToInt16(info[i,1]);
}
}
Console.Write("分数最高的是{0},分数是{1}",maxName, maxScore);
string[] name = { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };
int[] score = { 89, 90, 98, 56, 60, 91, 93, 85 };
int maxScore = score[0];
int nameId = 0;
for(int i=0; i<score.Length; i++)
{
if (maxScore < score[i])
{ maxScore = score[i];
nameId=i;
}
}
int[] score = { 89, 90, 98, 56, 60, 91, 93, 85 };
int maxScore = score[0];
int nameId = 0;
for(int i=0; i<score.Length; i++)
{
if (maxScore < score[i])
{ maxScore = score[i];
nameId=i;
}
}