用C语言解答:编程输入3个学生的学号、姓名、三门课程的成绩,存入一个结构体型的数组,统计每

要快啊 我把分全加给他

第1个回答  推荐于2016-10-15
#include<stdio.h>
#include<stdlib.h>
struct score
{
int num;
char name[12];
int math;
int english;
int computer;
long sum;
double average;
}a;
main()
{
int i , sum ;
struct score *p
for(i=0;i<10;i++)
{
printf("输入各项信息:\n");
printf("学号,姓名,数学,英语,计算机:\n");
scanf("%d%s%d%d%d",&p->num,&p->name,&p->math,&p->english,&p->computer);
sum = p->math+p->english+p->computer;
printf("%d %s %d %d %d %d %f \n",p->num,p->name, p->math,p->english,p->computer,sum, sum/3.0 );
}
system("PAUSE");
}本回答被网友采纳
相似回答