Search
 
SCRIPT & CODE EXAMPLE
 

C

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
", sum);
    }else if(x[0] == 'M'){
        printf("%.1lf
", sum/12.0);
    }
    return 0;
}
Comment

Uri/Beecrowd Problem no - 1184 solution in C

#include<stdio.h>
int main(){
    double M[12][12],sum = 0;
    int i,j,counter = 1;
    char O[2];
    scanf("%s", O);
    
    for(i = 0; i < 12; i++){
        for(j = 0; j < 12; j++){
            scanf("%lf", &M[i][j]);
        }
    }
    for(i = counter; i < 12; i++){
        for(j = 0; j < counter; j++){
            sum += M[i][j];
        }
        counter++;
    }
    if(O[0] == 'S'){
        printf("%.1lf
", sum);
    }else if(O[0] == 'M'){
        printf("%.1lf
", sum / 66.0);
    }
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: what the value in array not initialized yet c 
C :: esp rainmaker led 
C :: Single-line Comments in C 
C :: c language dictionary implemet 
C :: Odd-Even-inator with function in C 
C :: tetris rotate shape 
C :: libraries that are not supported by null sound safety in flutter 
C :: python adding calculator 
C :: profile time bash script 
C :: unconstrained box flutter 
C :: or gmode inline image 
C :: q2. wap in c to input 5 numbers in an array and display in reverse order. 
C :: navigate to line intellij 
C :: online embedded c compiler 
C :: formula to find the area of a trapezium in c 
C :: how to check where the last char is in a string c 
C :: mitch mcconnell 
Dart :: flutter delay 
Dart :: rounded raisedbutton in flutter 
Dart :: Waiting for another flutter command to release the startup lock.. 
Dart :: card border radius in flutter 
Dart :: flutter textbutton autofocus 
Dart :: How to create a small circular dot in FLutter code example 
Dart :: drawer corner radius flutter 
Dart :: how to pop all screens flutter 
Dart :: flutter rotatedbox 
Dart :: inr symbol in flutter 
Dart :: install getx 
Dart :: create a validator in flutter 
Dart :: flutter alertdialog padding 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =