[go: up one dir, main page]

0% found this document useful (0 votes)
11 views2 pages

Grade Using Else If

Uploaded by

sopkuateb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views2 pages

Grade Using Else If

Uploaded by

sopkuateb
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 2

#include <stdio.

h>

int main() {

int score;

// Prompt the user for input

printf("Enter the student's score: ");

scanf("%d", &score);

// Determine the grade based on the score

if (score >= 90) {

printf("Grade: Excellent\n");

else if (score >= 80) {

printf("Grade: Very Good\n");

else if (score >= 70) {

printf("Grade: Good\n");

else if (score >= 50) {

printf("Grade: Passed\n");

else {

printf("Grade: Failed\n");

}
return 0;

You might also like