软件能够运行,在这里报错
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]+ ' ');
}
}
}