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);
}
}
}
现在你应该知道你的.length为啥用不了吧
同样的问题,还好里看到了你的
好了我知道了。逗号要中文!