C# ?代碼:
void?ScoreShow(){ double[]?score?=?new?double[30]; double?scoreNum=0; double?scoreBig=0; double?scoreSmall=10000; for(int?i=0;i<30;i++){ score[i]=input.nextdouble(); scoreNum=scoreNum+score[i]; if(score[i]>scoreBig){scoreBig=score[i];
} if(score[i]<scoreSmall){scoreSmall=score[i];
} } system.out.println("總分"+scoreSmall+"平均分"+scoreSmall/30+最高分+scoreBig+最低分+scoreSmall);}