in reply to Help using a while loop with STDIN

I think what you're looking for is a while loop. You can wrap your prompt/check in a while loop that always loops until a correct answer is submitted.