以下程序的功能是根据输入的是 y ( Y )还是 n ( N ),在屏幕上分别显示出“ This is YES. ”或“ This is NO. ”,请填空。 #include
void YesNO(char ch) { switch(ch) { case ' Y ' : case ' y ' :printf( " \n This is YES.\n " ); ; case ' N ' : case ' n ' : printf( " \n This is NO.\n " ); } } main() { char ch; printf( " \nEnter a char ' Y ' , ' y ' or ' n ' , ' N ' : " ); ch= ; printf( " ch:%c " ,ch); YesNo(ch); }