diff --git a/Task2.c b/Task2.c new file mode 100644 index 0000000..8483903 --- /dev/null +++ b/Task2.c @@ -0,0 +1,29 @@ + +#include +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; + } + + } + } +} +