string[] names=new string[]{"吴松","钱东宇","伏晨","陈赫","周蕊","林日鹏","何昆","关欣"};
int[] scores=new int[]{29,90,98,56,60,91,93,85};
int index=0;
int score=scores[0];
for(int i=0;i<scores.Length;i++){ if(scores[i]>score){ score=scores[i];index=i;}}
Console.Write("分数最高的是" + names[index] + ",分数是" + score);
int[] scores=new int[]{29,90,98,56,60,91,93,85};
int index=0;
int score=scores[0];
for(int i=0;i<scores.Length;i++){ if(scores[i]>score){ score=scores[i];index=i;}}
Console.Write("分数最高的是" + names[index] + ",分数是" + score);
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]);我没懂
2017-08-21
Console.WriteLine(NAME+"出生在"+CITY+"的一个工人家庭");//使用常量
int[] score = new int[] {29,90,98,98,60,91,93,85 };
string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };int max=0;string maxname = "";for (int i = 0; i < 8;i++ ){if (max < score[i]){max=score[i];maxname= name[i];
}
}
Console.Write("分数最高的是{0},分数是{1},", maxname, max);
string[] name = new string[] { "吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣" };int max=0;string maxname = "";for (int i = 0; i < 8;i++ ){if (max < score[i]){max=score[i];maxname= name[i];
}
}
Console.Write("分数最高的是{0},分数是{1},", maxname, max);
static void Main(string[] args){ int max = 0;int j=0; string[,] chengji={{"吴松","89"},{"钱东宇","90"},...}};max = int.Parse(chengji[0,1]);
for(int i = 0;i < 7;i++){ if(int.Parse(chengji[i,1])>max){max = int.Parse(chengji[i,1]);j=i;}
}Console.Write("分数最高的是"+chengji[j,0]+",成绩是"+chengji[j,1]);
}
for(int i = 0;i < 7;i++){ if(int.Parse(chengji[i,1])>max){max = int.Parse(chengji[i,1]);j=i;}
}Console.Write("分数最高的是"+chengji[j,0]+",成绩是"+chengji[j,1]);
}