#include
struct student
{
int number;
char name[50];
int math_score;
int computer_score;
int english_score;
float average;
};
int main(void)
{
int i;
struct student a[5];
printf("请输入学生信息:学号、姓名、高等数学成绩、计算机成绩、英语成绩,数据间以空格分隔:\n");
for (i=0; i<5; i++)
{
scanf("%d %s %d %d %d", &a[i].number, a[i].name, &a[i].math_score, &a[i].computer_score, &a[i].english_score);
a[i].average = (a[i].math_score+a[i].computer_score+a[i].english_score)/3.0;
}
printf("平均分90分以上的学生学号为:\n");
for (i=0; i<5; i++)
{
if (a[i].average > 90)//如果90分以上包括90的话就在>后加个=吧
printf("%d\n", a[i].number);
}
return 0;
}