Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
568 B
1
Indexable
Never
#include<stdio.h>

int main()
{
    int marks;
    
    printf("Enter your marks: ");
    scanf("%d", &marks); // You need to use '&' before 'marks' to pass the address of the variable to scanf.

    if (marks > 91 && marks <= 100) // Adjusted the condition to include marks = 100.
    {
        printf("Excellent");
    }
    else if (marks > 81 && marks <= 91)
    {
        printf("Very good");
    }
    else if (marks > 71 && marks <= 81)
    {
        printf("Good");
    }
    else
    {
        printf("Not bad, better luck next time");
    }

    return 0;
}