Guessing game: how to quit the game?

Home Forums C Programming Guessing game: how to quit the game?

Viewing 1 reply thread
  • Author
    Posts
    • #2171
      AraceliBinkley
      Participant

      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.

    • #3503
      GWILouisaxwzkla
      Participant

      If your in the main function you could just use a return statement , I’d have to see the code , though…

Viewing 1 reply thread
  • You must be logged in to reply to this topic.