string[] names = {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = {89,90,98,56,60,91,93,85};
int maxScore = 0;
string maxName = null;
for(int i=0;i<names.Length;i++){
if(score[i] > maxScore){
maxScore = score[i];
maxName = names[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",maxName,maxScore);
int[] score = {89,90,98,56,60,91,93,85};
int maxScore = 0;
string maxName = null;
for(int i=0;i<names.Length;i++){
if(score[i] > maxScore){
maxScore = score[i];
maxName = names[i];
}
}
Console.Write("分数最高的是{0},分数是{1}",maxName,maxScore);
//声明“职位”数组,初始化为:"经理","项目主管","技术总监","财务主管"
string[] job = new string[4]{"经理","项目主管","技术总监","财务主管"};
for (int i = 0; i <job.Length; i++)
{
Console.Write(job[i]);//打印职位
}
string[] job = new string[4]{"经理","项目主管","技术总监","财务主管"};
for (int i = 0; i <job.Length; i++)
{
Console.Write(job[i]);//打印职位
}
2016-05-28