string[] name = {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score= {90,65,88,70,46,81,100,68};
int temp = score[0];
for (int i = 0;i < 8;i++)
{
int sum = sum + score[i];
}
int avg = sum/8;
for (int i = 0;i < 8;i++)
{
if(score[i] > avg)
{
string name1 = name1 + " " + name[i];
}
}
{
Console.WriteLine("平均分是{0},高于平均分的有{1}",avg,name1);
}
冰封一切1
相关分类