哪里有問(wèn)題嗎?
string[] names = new string[]{"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};
? ? ? ? ? ? ?int[] scores = new int[]{89,90,98,56,60,91,93,85};
? ? ? ? ? ? int t=0;
? ? ? ? ? ? int max=scores[0];
? ? ? ? ? ? for(int i=1;i<scores.Length;i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? if (max < scores[i])
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? max = scores[i];
? ? ? ? ? ? ? ? ? ? t=i;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? Console.WriteLine("分?jǐn)?shù)最高的是" + names[t]+",分?jǐn)?shù)是"+max);
2017-03-30
把最下面一行的分?jǐn)?shù)是前面的逗號(hào)用中文逗號(hào),