#include<stdio.h>
main( )
{
char ch;
ch=getchar( );
switch(ch)
{
case ‘A’ : printf(“%c”,’A’);
case ‘B’ : printf(“%c”,’B’); break;
default: printf(“%s\n”,”other”);
}
}
当从键盘输入字母A时,运行结果为:
登录后提交答案