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.
30 lines
354 B
30 lines
354 B
1 year ago
|
|
||
|
#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;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|