找不出問題在哪?
string[] names=new names[8]{"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"}; int[] score=new score[8]{89,90,98,56,60,91,93,85}; int max=score.Max(); for(int i=0;i<score.Length;i++) { ? ? ?if(score[i]==max) ? ? ?{ ? ? ? ? ? ? ?Console.Write("分數(shù)最高的是{0},分數(shù)是{1}",names[i],score[i]); ? ? ?} } 哪里錯了?
2017-12-15
names數(shù)組寫的時候引用錯了