- This topic has 1 reply, 2 voices, and was last updated 15 years, 11 months ago by .
Viewing 1 reply thread
Viewing 1 reply thread
- The forum ‘C Programming’ is closed to new topics and replies.
Home › Forums › C Programming › Guessing game: how to quit the game?
Hello Everyone,
I am writing a guessing game using for loop but did not know how to quite the game at any stage that I want. This is an example of my for loop:
………………………………………..
case 1:
askquestion_1( guesses, “nAttempt %d: Is your animal a dog? “, dog );
break;
case 2:
askquestion_2( guesses, “nAttempt %d: Is your animal a mouse? “, mouse );
break;
…………………………………..
How can i quiet after the first break. Can anyone help?
Thanks.
If your in the main function you could just use a return statement , I’d have to see the code , though…