Untitled
unknown
plain_text
2 years ago
568 B
4
Indexable
#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; }
Editor is loading...