To Print Appropriate Message
If Pressed… |
Message |
A |
Excellent |
B |
Good |
C |
Fair |
D |
Poor |
#include <stdio.h> |
void main() |
{ |
char c; |
printf("Enter The
Character : "); |
scanf("%c",&c); |
if(c=='A') |
{ |
printf("\nExcellent"); |
} |
if(c=='B') |
{ |
printf("\nVery Good"); |
} |
if(c=='C') |
{ |
printf("\nFair"); |
} |
if(c=='D') |
{ |
printf("\nPoor"); |
} |
} |