当我输入正确时,为什么我使用getchar()无法看到应输出的“对”。而使用system("pause")却可以看到呢?
因为输入缓冲区中还有一个换行符,所以你需要两个getchar()才行system("pause")是暂停,和输入缓冲区无关
rewind(stdin);getchar();