Question: In C++ create this game. Also what are there different formulas for finding the midpoint of the remaining numbers? Guess a number between 1 and

In C++ create this game. Also what are there different formulas for finding the midpoint of the remaining numbers?

Guess a number between 1 and 100.

Is it 50? (h/l/c): h

Is it 75? (h/l/c): h

Is it 87? (h/l/c): l

Is it 81? (h/l/c): c

Great! Do you want to play again? (y/n): y

Guess a number between 1 and 100.

Is it 50? (h/l/c): l

Is it 25? (h/l/c): h

Is it 37? (h/l/c): c

Great! Do you want to play again? (y/n): n

Notice that the user inputs the characters h, l, and c for higher, lower, and correct, respectively.

For the game to work best, every time your program makes a guess it should choose the midpoint of the remaining possible values. Consider the first example above, in which the user has chosen the number 81

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!