Write a cpp program that implements a guess-the-number game


Problem

Write a C++ program that implements a "Guess-the-Number" game. First call the rand() function to get a random number between 1 and 15 (I will post a pdf about rand() during the week). The program then enters a loop that starts by printing "Guess a number between 1 and 15:". After printing this, it reads the user response. (Use cin >> n to read the user response.) If the user enters a value less than the random number, the program prints "Too low" and continues the loop. If the user enters a number larger than the random number, the program prints "Too high" and continues the loop. If the user guesses the random number, the program prints "You got!", and then prints: how many times the user guessed too high, how many times the user guessed too low, and the total number of guesses. You will have to keep track of how many times the user guesses.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a cpp program that implements a guess-the-number game
Reference No:- TGS03311562

Expected delivery within 24 Hours