A college has the following rules for the grading system:
1. Below 25 – F
2. 25 to 45 – E
3. 45 to 50 – D
4. 50 to 60 – C
5. 60 to 80 – B
6. Above 80 – A
MAIN PROGRAM :-
#include <stdio.h>
int main()
{
int a;
printf("enter the student marks=");
scanf("%d",&a);
if(a<25)
{
printf("F");
}
else if(a>=25&&a<45)
{
printf("E");
}
else if(a>=45&&a<50)
{
printf("D");
}
else if(a>=50&&a<60)
{
printf("C");
}
else if(a>=60&&a<80)
{
printf("B");
}
else if(a>=80&&a<=100)
{
printf("A");
}
else
{
printf("invalid marks");
}
return 0;
}
INPUT :-
--THANKS FOR VISITING THIS WEBSITE--
It's really helpful .
ReplyDelete