void clean_stdin(void) { int c; do { c = getchar(); } while (c != '\n' && c != EOF); } 转载于:https://www.cnblogs.com/Frank-dev-blog/p/9570800.html