ADD file via upload

main
pvl836cjw 1 year ago
parent 05b1cc9b26
commit 5a69983278

@ -0,0 +1,29 @@
#include<stdio.h>
int main()
{
int i;
float a[13],x,sum;
for(i=1;i<=12;i++)
{
scanf("%f",&a[i]);
}
for(i=1;i<=12;i++)
{
if(i==1||i==5||i==9)
printf("%5.0f ",a[i]);
else
{
printf("%0.1f ",a[i]);
sum+=a[i];
if(i%4==0)
{
printf("%0.1f",sum);
printf("\n");
sum=0;
}
}
}
}
Loading…
Cancel
Save