How do I get started in making a guessing game?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbdalecia
    New Member
    • Sep 2009
    • 8

    How do I get started in making a guessing game?

    In C++ I have to create a guessing game that has three loops and and I have to make a flowchart. Now mind you I am a beginner at all of this. Someone help!
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Guessing what?
    Why 3 loops? What is each loop going to do?

    Flowcharts are a fairly simply way of mapping out the operation of a simple program (such as this). Read This

    Comment

    • sbdalecia
      New Member
      • Sep 2009
      • 8

      #3
      The specifications

      Dealing wih numbers.
      First loop: A for loop and should count up from 1 to 4.
      Second loop: A while loop and should caount from 4 to 1.
      Third loop: A do...while loop and should count up from 1 to 4 in increments of 2.

      The second part deals with automating the guessing and high/low decision. No user input required.

      I basically just need help on setting it up.

      Comment

      • whodgson
        Contributor
        • Jan 2007
        • 542

        #4
        I assume the flow chart simply explains how the game works.
        If that is correct why dont you post your chart and also the code which supports it identifying where you are having problems.
        A simple guessing game usually requires the the generation of random numbers based on a seed (integer).i.e. ask the user to enter a number between 10 and 20 and use this for the seed to generate the 4 random numbers between 1 and 10. This happens every cycle of the while loop referred to below. Now you have the numbers (say 1,5,3,8)
        Now (within the while loop) ask the user to guess the four numbers with cin>>n; in a four loop.
        Report the degree of success each cycle of the while loop.

        Comment

        Working...