Create a C++ game that would have an output that is given in the picture. First loop in the game needs to include: the user to choose a number between 1 and 100. and the user is only allowed 6 tries in the game.  Second loop needs to ask the player if they want to play again answering with a character 'Y' or 'N'.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter8: Advanced Data Handling Concepts
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question

Create a C++ game that would have an output that is given in the picture.

First loop in the game needs to include: the user to choose a number between 1 and 100. and the user is only allowed 6 tries in the game. 

Second loop needs to ask the player if they want to play again answering with a character 'Y' or 'N'.

The second game is a guessing game. A sample run for the game follows, and user input is shown
in boldface in the sample run.
Welcome to the game of Guess It!
I will choose a number between 1 and 100.
You will try to guess that number. If you guess wrong, I will tell you if
you guessed too high or too low.
You have 6 tries to get the number.
OK, I am thinking of a number. Try to guess it.
Your guess? 50
Too high!
Your guess? 112
Illegal guess. Your guess must be between 1 and 100.
Try again. Your guess? 23
**** CORRECT ****
Want to play again? N
Good bye, it was fun. Play again soon.
Transcribed Image Text:The second game is a guessing game. A sample run for the game follows, and user input is shown in boldface in the sample run. Welcome to the game of Guess It! I will choose a number between 1 and 100. You will try to guess that number. If you guess wrong, I will tell you if you guessed too high or too low. You have 6 tries to get the number. OK, I am thinking of a number. Try to guess it. Your guess? 50 Too high! Your guess? 112 Illegal guess. Your guess must be between 1 and 100. Try again. Your guess? 23 **** CORRECT **** Want to play again? N Good bye, it was fun. Play again soon.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT