Its something like fflush(stdin) that was needed in C for more than once inputting the string.