diff --git a/2nd.cpp b/2nd.cpp new file mode 100644 index 0000000..6185939 --- /dev/null +++ b/2nd.cpp @@ -0,0 +1,27 @@ +#include +int main(){ + float num[3][4]; + for(int i=0;i<3;i++){ + for(int j=0;j<4;j++){ + scanf("%f",&num[i][j]); + } + } + for(int i=0;i<3;i++){ + float sum=0; + for(int j=0;j<=3;j++){ + if(j==0){ + printf("%.0f ",num[i][j]); + }else{ + printf("%.1f ",num[i][j]); + if(j>=1){ + sum+=num[i][j]; + } + if(j==3){ + printf("%.1f \n",sum); + sum=0; + } + } + } + } + return 0; +}