ADD file via upload

main
pqzbgempc 6 days ago
parent 3bc496a152
commit bbfa2c6338

@ -0,0 +1,23 @@
#include <stdio.h>
struct s {
int num;
float m;
float p;
float e;
};
int main()
{
struct s stu[3];
int i;
float sum;
for(i=0;i<3;i++)
scanf("%d %f %f %f",&stu[i].num,&stu[i].m,&stu[i].p,&stu[i].e);
for(i=0;i<3;i++)
{
sum=stu[i].m+stu[i].p+stu[i].e;
printf("%d %.1f %.1f %.1f %.1f\n",stu[i].num,stu[i].m,stu[i].p,stu[i].e,sum);
}
return 0;
}
Loading…
Cancel
Save