Beecrowd Problem 1181 – (Line in Array)) solution | C language

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


int main()
    double N[12][12],sum = 0.0;
    int i, j, k, l, m, n;
    char x[2];
    scanf("%d %s", &k, &x);
    for(i = 0;i < 12;i++){
        for(j = 0;j < 12;j++){
            scanf("%lf", &N[i][j]);
    for(i = 0;i < 12;i++){
            sum += N[k][i];
    if(x[0] ==' S')printf("%.1lf\n", sum);
    else if(x[0] == 'M')printf("%.1lf\n", sum / 12.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