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.
32 lines
509 B
32 lines
509 B
1 year ago
|
#include <stdio.h>
|
||
|
#include <time.h>
|
||
|
#include <stdlib.h>
|
||
|
struct Student
|
||
|
{
|
||
|
int num;
|
||
|
float msc;
|
||
|
float psc;
|
||
|
float esc;
|
||
|
}a[100];
|
||
|
int main()
|
||
|
{
|
||
|
int i;
|
||
|
for (i=0;i<=2;i++)
|
||
|
{
|
||
|
scanf("%d",&a[i].num);
|
||
|
scanf("%f",&a[i].msc);
|
||
|
scanf("%f",&a[i].psc);
|
||
|
scanf("%f",&a[i].esc);
|
||
|
}
|
||
|
for (i=0;i<3;i++)
|
||
|
{
|
||
|
printf("%d ",a[i].num);
|
||
|
printf("%.1f ",a[i].msc);
|
||
|
printf("%.1f ",a[i].psc);
|
||
|
printf("%.1f ",a[i].esc);
|
||
|
printf("%.1f\n",a[i].esc+a[i].msc+a[i].psc);
|
||
|
|
||
|
}
|
||
|
return 0;
|
||
|
}
|