string []name=new string[8]{"景珍","林惠洋","成蓉",,"洪南昌","龙玉民","单江开","田武山","王三明"};
int []fennshu=new int[8]{90,65,83,70,46,81,100,68};
int pj =0;
int sum=0;
for(int x=0;x<fenshu.Length;x++)
{
sum+=fenshu[x];
}
pj=sum/fenshu.Length;
Console.WriteLine("平均分是{0},高于平均分的有:",pj);
for(int y=0;y<name.Length;y++)
{
if(fenshu[y]>pj)
{
Console.Write(name[y]+" ");
}
}
啊,你这问题好多呀,
1,数组命名,[]紧贴数据类型(string []name···),
2,标点部分圆角和半角,写代码都是英文的标题,中文标点只有在输出字符串里会出现(string []name···)。
3. int []fennshu=new int[8]{90,65,83,70,46,81,100,68};中"fennshu"!!!
写程序切记要仔细。