就不懂为啥不让过?先说好不知道为啥我的.length用不了才用的数字。求问
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);
}
}
}