就不懂為啥不讓過?先說好不知道為啥我的.length用不了才用的數(shù)字。求問
using System;
using System.Collections.Generic;
using System.Text;
namespace projAboveAvg
{
??? class Program
??? {
??????? static void Main(string[] args)
??????? {
??????? string[] name=new string[8]{"景珍","林惠洋","成蓉","洪南昌","龍玉民","單江開","田武山","王三明"};
??????? int[] score=new int[8]{90,65,88,70,46,81,100,68};
??????? int sum=0;
??????? string x="";
??????? double avg=0;
??????? for(int i=0;i<8;i++){
??????????? sum=sum+score[i];
??????? }
??????? avg=sum/8;
??????? for(int y=0;y<8;y++){
??????????? if(score[y]>avg){
??????????????? x=x+name[y]+" ";
??????????? }
??????????? else{
??????????????? continue;
??????????? }
??????? }Console.Write("平均分是"+avg+",高于平均分的有:\r\n"+x);
??? }
}
}
2019-01-28
現(xiàn)在你應(yīng)該知道你的.length為啥用不了吧
2018-08-27
同樣的問題,還好里看到了你的
2018-08-21
好了我知道了。逗號(hào)要中文!