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