string[] name = new string[] {"姓名",字數不夠自己寫};
int[] score = new int[] { 89, 90, 98, 56, 60, 91, 93, 85 };int max;max = score[0];int index = 0;
for(int i=1;i<score.Length;i++){if (score[i] > max){max = score[i];index = i;}}Console.WriteLine("分數最高的是{0},"+"分數是{1}",name[index],max);
int[] score = new int[] { 89, 90, 98, 56, 60, 91, 93, 85 };int max;max = score[0];int index = 0;
for(int i=1;i<score.Length;i++){if (score[i] > max){max = score[i];index = i;}}Console.WriteLine("分數最高的是{0},"+"分數是{1}",name[index],max);