#include <stdio.h> #include <conio.h> #include <Windows.h> int main() { char c; while (true) { if (_kbhit())//判断是否有键盘按下 { c = getchar(); printf("%c\n", c); Sleep(1000); } printf("_____"); Sleep(10); } return 0; }
#include <stdio.h> #include <conio.h> #include <Windows.h> int main() { char c; while (true) { if (_kbhit())//判断是否有键盘按下 { c = getchar(); printf("%c\n", c); Sleep(1000); } printf("_____"); Sleep(10); } return 0; }
转载于:https://www.cnblogs.com/qijinbiao/p/5106315.html