expand icon
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
book Programming Logic and Design, Introductory 7th Edition by Joyce Farrell cover

Programming Logic and Design, Introductory 7th Edition by Joyce Farrell

Edition 7ISBN: 1285225562
Exercise 11

Draw a structured flowchart or write pseudocode that describes the process ofguessing a number between 1 and 100. After each guess, the player is told that theguess is too high or too low. The process continues until the player guesses thecorrect number. Pick a number and have a fellow student try to guess it by followingyour instructions.

Step-by-step solution
Verified
like image
like image

Step 1 of 3

The steps required in the game are as follows:

• Generate a random number.

• Get the input from the user.

• Run the loop until the user guesses the correct number.

o If the guess is lower than the generated random number, then display the message Too low and ask the user to guess the number again.

o Else if the number is greater than the generated random number, then display the message Too High and ask the user to guess the number again.

• After breaking out from the loop, display the message that the guess is correct.


Step 2 of 3


Step 3 of 3

close menu
Programming Logic and Design, Introductory 7th Edition by Joyce Farrell
cross icon