Saturday 18 April 2020

Solution of URI 2344 :: Notas da Prova


Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.

#include <stdio.h>

int main()
{
    int N;
    scanf("%d", &N);

    if(N >= 86)
        printf("A\n");

    else if(N >= 61 && N <= 85)
        printf("B\n");

    else if(N >= 36 && N <= 60)
        printf("C\n");

    else if(N >= 1 && N <= 35)
        printf("D\n");

    else
        printf("E\n");
    return 0;
}

0 comments:

Post a Comment

Note: only a member of this blog may post a comment.