用getchar的一定要用while读掉多余的字符(他行末有空格)
getchar
while
char ch=getchar(); while(ch!='Q'&&ch!='C')ch=getchar();