You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#include <stdio.h>
|
|
|
|
|
struct Student
|
|
|
|
|
{
|
|
|
|
|
int num;
|
|
|
|
|
float a;
|
|
|
|
|
float b;
|
|
|
|
|
float c;
|
|
|
|
|
float d;
|
|
|
|
|
} ;
|
|
|
|
|
int main()
|
|
|
|
|
{ int i,j;
|
|
|
|
|
struct Student stu[3];
|
|
|
|
|
for(i=0;i<3;i++)
|
|
|
|
|
{
|
|
|
|
|
scanf("%d%f%f%f",&stu[i].num,&stu[i].a,&stu[i].b,&stu[i].c);
|
|
|
|
|
}
|
|
|
|
|
stu[0].d=stu[0].a+stu[0].b+stu[0].c;
|
|
|
|
|
stu[1].d=stu[1].a+stu[1].b+stu[1].c;
|
|
|
|
|
stu[2].d=stu[2].a+stu[2].b+stu[2].c;
|
|
|
|
|
for(j=0;j<3;j++)
|
|
|
|
|
{
|
|
|
|
|
printf("ѧ<EFBFBD><EFBFBD> %d <20><><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD> %.1f <20><>ѧ<EFBFBD><D1A7><EFBFBD><EFBFBD><EFBFBD>ɼ<EFBFBD> %.1f Ӣ<><D3A2><EFBFBD>ɼ<EFBFBD> %.1f <20>ܳɼ<DCB3> %.1f\n",stu[j].num,stu[j].a,stu[j].b,stu[j].c,stu[j].d);
|
|
|
|
|
}
|
|
|
|
|
}
|