-
char readchar() { char tmp = 0; char ch; bool read = false; while (ch = getchar()) { if (ch == ‘-‘ || ch == ‘+‘) { read = true; tmp = ch; } else if (read) { break; } else { continue; } } return tmp; }
时间: 2024-11-07 05:56:20
char readchar() { char tmp = 0; char ch; bool read = false; while (ch = getchar()) { if (ch == ‘-‘ || ch == ‘+‘) { read = true; tmp = ch; } else if (read) { break; } else { continue; } } return tmp; }