using System;
using System.Collections.Generic;
using System.Text;
namespace projAboveAvg
{
class Program
{
static void Main(string[] args
string[] name = new string[] { "景珍", "林惠洋", "成蓉", "洪南昌", "龙玉民", "单江开", "田武山", "王三明" };
int[] score = new[] { 90, 65, 88, 70, 46, 81, 100, 68 };
int sum = 0, ave=0;
{
foreach (int x in score)
sum += x;
ave = sum / score.Length;
}
Console.WriteLine("平均分是{0},高于平均分的有:", ave);
for (int i = 0; i < score.Length; i++)
{
if (score[i] > ave)
Console.Write(name[i]+ ' ');
}
}
}
你看看你的main方法都被破坏了。static void Main(string[] args){}
感谢仔细阅读,但是这个是复制过来的时候变得,那部分是给出来的,应该不是这个的原因