Question: Write a C + + program that plays a guessing game. Use a Do - while loop around the game, so that the user plays
Write a C program that plays a guessing game.
Use a Dowhile loop around the game, so that the user plays once before getting asked if they want to play again.
In each game:
Choose a random number between and
Initialize a guessCounter int variable to
Prompt the user to guess the number.
After the user guesses, compare the guess to the correct answer:
If the guess is too high, let the user know, increment the guess counter, and prompt for another guess.
If the guess is too low, let the user know, increment the guess counter, and prompt for another guess.
If the guess is correct, increment the guess counter, let the user know, and end the game.
After each game, prompt the user if they want to play again. If they do play again.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
