Hello,
I am writing a program that will run once, and once done, ask the user if they would like to use it again. It has to work with any answer beginning with "y". I am having trouble with clearing the buffer when I answer "yes" or anything other than "y" itself. It works perfectly when "y" is entered, now I just need to somehow accept the other yes words and clear the buffer once the "y"...
User Profile
Collapse
-
Problem clearing buffer, could use some help.
-
Problem with a while loop...
I am trying to write a program using a while loop, and a nested for loop inside. The program needs to run once, and then after completion, ask if the user would like to run the program again. The while statement needs to be true while the reply is "y" and must clear the buffer afterwards (i.e. must accept "yes", "youbetcha" etc. and clear the buffer after. ) Im stuck, the program is compiling, but returns to prompt...
No activity results to display
Show More