Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- double arr[12][12],sum=0.0;
- int n,j,i;
- char ch;
- scanf("%d %c",&n,&ch);
- for(i=0; i<12; i++)
- {
- for(j=0; j<12; j++)
- {
- scanf("%lf",&arr[i][j]);
- }
- }
- for(j=0; j<12; j++)
- {
- sum=sum+arr[j][n];
- }
- if(ch=='S')
- printf("%.1lf\n",sum);
- else if(ch=='M')
- printf("%.1lf\n",(sum/12.0));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement