using System;
using System.Collections.Generic;
using System.Text;
namespace projAboveAvg
{
class Program
{
static void Main(string[] args)
{
string[] xm = new string[8] { "景珍", "林惠洋", "成蓉", "洪南昌",
"龙玉民", "单江开", "田武山","王三明" };
int[] fs = new int[8] { 90, 65, 88, 70, 46, 81, 100, 68 };
int max = 0;
int pj = 0;
for (int i = 0; i < fs.Length; i++)
{
max += fs[i];
}
pj = max / fs.Length;
Console.WriteLine("平均分数是:" + pj );
Console.WriteLine("高于平均分的有:");
for (int x = 0; x < fs.Length; x++)
{
if (pj < fs[x])
{
Console.WriteLine(xm[x]);
}
}
}
}
}
Console.WriteLine(xm[x]);改为 Console.Write(xm[x]);