Beecrowd Problem 1185 – (Above the Secundary Diagonal) solution | C language

**Before watching this make sure that you’ve tried enough**

#include <stdio.h>
int main()
    double N[12][12],sum = 0.0;
    char O[2];
    scanf("%s", &O);
    int n = 1, i, j;
    for(i = 0;i < 12;i++){
        for(j = 0;j < 12;j++){
            scanf("%lf", &N[i][j]);
    for(i = 10;i >= 0;i--){
        for(j = 0;j < n;j++){
            sum += N[i][j];
    if (O[0] == 'S')printf("%.1lf\n", sum);
    else printf("%.1lf\n", sum/ 66.0);

    return 0;


If this solution helped you, please share this with your friends.
And if you have anything to say, let me know in the comment section.
More solutions are coming so Like our Facebook page and Subscribe to our YouTube channel to stay connected.

Leave a Comment