URI Problem 1117 – ” Score Validation” solution( Bangla ) | C language

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

#include<stdio.h>

int main()
{
    int i, j = 0;
    float n, a, b, avg, ar[2];
    for (i = 0;i < 100;i++){
        scanf("%f", &n);
    if (n >= 0 && n <= 10){
        ar[j] = n;
        j++;
    }
    else printf("nota invalida\n");
    if (j > 1) break;
    }
    avg = (ar[0] + ar[1]) / 2;
    printf("media = %.2f\n", avg);

    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