摘要: 在使用控制台程序练习键盘输入时,会产生回车干扰。代码如下#include <stdio.h>int main(void){ char ch = ' '; while(ch != 'n') { printf("If you input 'n', the circle ends.\n"); ch = getchar(); } return 0;} 当在控制台程序中输入某个字母,例如 'm',然后回车,会出现两次提示:If you input 'n', the circle ends.If 阅读全文
posted @ 2012-12-30 23:11 林燃 阅读(470) 评论(4) 推荐(0) 编辑