Horje
BEE/URI problem no 1181 solution in C Code Example
BEE/URI problem no 1181 solution in C
#include<stdio.h>
int main(){
    double M[12][12],sum = 0.0;
    int i,j,L;
    char x[2];
    
    scanf("%d", &L);
    scanf("%s", x);
    for(i = 0; i < 12; i++){
        for(j = 0; j < 12; j++){
            scanf("%lf", &M[i][j]);
        }
    }
    for(i = 0; i < 12; i++){
        sum += M[L][i];
    }
    if(x[0] == 'S'){
        printf("%.1lf\n", sum);
    }else if(x[0] == 'M'){
        printf("%.1lf\n", sum/12.0);
    }
    return 0;
}




C

Related
Size of Operator in C language Code Example Size of Operator in C language Code Example
how to get add to number C Code Example how to get add to number C Code Example
kleiner gleich zeichen MAC Code Example kleiner gleich zeichen MAC Code Example
char ASCII in c Code Example char ASCII in c Code Example
remove char from string Code Example remove char from string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7