double avg;
int index=0,sum=0;
foreach (int a in fenshu)
{sum+=a; }
avg = sum / fenshu.Length;
Console.Write("平均分是" + avg + ",高于平均分的有:");
for (int i=0;i <fenshu.Length;i++)
{if (fenshu[i] >= avg)
{ index = i;
Console.Write(name[index]+" "); }
}
int index=0,sum=0;
foreach (int a in fenshu)
{sum+=a; }
avg = sum / fenshu.Length;
Console.Write("平均分是" + avg + ",高于平均分的有:");
for (int i=0;i <fenshu.Length;i++)
{if (fenshu[i] >= avg)
{ index = i;
Console.Write(name[index]+" "); }
}