#include <stdio.h>
int main () {
/* local variable definition */
char grade = 'B';
switch(grade) {
case 'A' :
printf("Excellent!/n" );
break;
case 'B' :
case 'C' :
printf("Well done/n" );
break;
case 'D' :
printf("You passed/n" );
break;
case 'F' :
printf("Better try again/n" );
break;
default :
printf("Invalid grade/n" );
}
printf("Your grade is %c/n", grade );
return 0;
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265123.html