Grade Description
E Excellent
V Very Good
G Good
An Average
F Fail
#include <stdio.h>
#include <conio.h>
void main()
{
char a;
printf("enter a character(E, V, G, A, F): ");
scanf("%c", &a);
switch (a)
{
case 'E':
printf("\nExcellent!");
break;
case 'V':
printf("\nVery Good!");
break;
case 'G':
printf("\nGood!");
break;
case 'A':
printf("\nAverage!");
break;
case 'F':
printf("\nFail!");
break;
default:
printf("enter your correct grade!");
}
getch();
}
OUTPUT
Enter a character(E, V, G, A, F): E
Excellent!
0 Comments