想知道錯(cuò)在哪兒
string[] names={"吳松","錢(qián)東宇","伏晨","陳陸","周蕊","林日鵬" ? ?,"何昆","關(guān)欣"};
int[] score={89,90,98,56,60,91,93,85};
int max=0;?
? for(int i=j= 0;i<score.Length;i++)
? {
? ? ?if(score[i]>max) ? ??
? ? ?{ ? ? ??
? ? ? ? max = score[i]; ? ? ? ??
? ? ? ? ?j=i; ? ? ?
? ? ?} ??
?}?
Console.Write("分?jǐn)?shù)最高的是{0},分?jǐn)?shù)是{1}", names[j],max );
2016-08-02
沒(méi)有i=j=0這種寫(xiě)法,分開(kāi)寫(xiě)