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