Write a program in play a guessing game with the user


Question:

Guessing Game

Write a program in C++ to play a guessing game with the user. The program should be able to make a guess about the chosen number by the user and ask whether the guessed number is above or below the chosen number. If the guess is correct the program should report the number of tries and the correctly guessed number.

As an advanced feature run the game 10 times and determine the average number of tries for the successful guess.

Print out for each game, the number the computer generated, the number of guesses made to guess the number.

The last piece of information to print out is the average number of guesses.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a program in play a guessing game with the user
Reference No:- TGS01937722

Now Priced at $20 (50% Discount)

Recommended (90%)

Rated (4.3/5)