e con while (getchar() != '\n'); se il buffer è già vuoto il programma non si blocca attendendo l'input?
Regole del Forum