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.
26 lines
407 B
26 lines
407 B
#include<stdio.h>
|
|
|
|
struct stu
|
|
{
|
|
int num;
|
|
float m,p,e,s;
|
|
} stu[3];
|
|
|
|
int main()
|
|
{
|
|
int i;
|
|
for(i=0;i<3;i++)
|
|
{
|
|
scanf("%d",&stu[i].num);
|
|
scanf("%f",&stu[i].m);
|
|
scanf("%f",&stu[i].p);
|
|
scanf("%f",&stu[i].e);
|
|
stu[i].s=stu[i].m+stu[i].p+stu[i].e;
|
|
}
|
|
for(i=0;i<3;i++)
|
|
{
|
|
printf("%d %.1f %.1f %.1f %.1f\n",stu[i].num,stu[i].m,stu[i].p,stu[i].e,stu[i].s);
|
|
}
|
|
return 0;
|
|
}
|