Aim
Develop a C program that takes a student's marks as input and displays their grade
based on the following criteria: 90 and above: Grade A 75 to 89: Grade B 60 to 74:
Grade C 50 to 59: Grade D Below 50: Grade F Choose a suitable control structure
to impleme nt this logic efficiently.
Code
#include<stdio.h>
int main()
int marks;
printf("Enter the student's marks:");
scanf("%d",&marks);
if(marks>100)
printf("Enter the correct marks between 0 and 100 \n");
else if(marks>=90)
printf("Grade A \n");
else if(marks >=75)
printf("Grade B \n");
else if(marks >=60)
printf("Grade C \n");
else if(marks >=50)
printf("Grade D \n");
else if(marks>=0)
printf("Grade F \n");
else
printf("Enter the correct marks between 0 and 100 \n");
return 0;