What kind of looping statements do you know about? Which one do you want to use?
When do you want to exit the loop? On user request or after a number of tries?