Question: C++ programming For program 2 you will write a simple number guessing game. The game will generate a random number in the range of 0

C++ programming
C++ programming For program 2 you will write a simple number guessing

For program 2 you will write a simple number guessing game. The game will generate a random number in the range of 0 -99. It will prompt the player to enter a guess and then tell the player if his/her guess was high or low. The program will loop, prompting and reading input and providing feedback to the player. This operation allows the player to "zero in" and ultimately guess the game's target number. A. Create a number guessing game in a source code file guess.cpp B. You may not use any functions from the stdio library C. The rest of the requirements are expressed in the pseudo code that also describes the game's behavior. seed the random number generator (details given below) generate a target number between 0 and 99 (details given below) loop (e.g., while (true)) - statements a-g are in the loop body a. prompt the user to guess a number from 0 to 99 (0 and 99 are allowed) b. read the guess c. if the guess is equal to -1 or less than 0 (your choice), terminate the program (this is a way to end the program early) d. if the guess and the target number are equal, print a success message (e.g., "Right" or "You Win" or similar) and terminate the program e. if the guess is less than the target number, print "Low" or a similar message f. if the guess is greater than the target number, print "High" or a similar message g. continue with next iteration of the loop (go back to step 3.a - end the loop body)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!