Question: Write a C++ program that generates a random integer number from 1 to 100 and then asks the user to guess what the number is.
Write a C++ program that generates a random integer number from 1 to 100 and then asks the user to guess what the number is. If the users guess is higher than the random number, the program should display Too high, try again. If the users guess is lower than the random number, the program should display Too low, try again. The program should use a loop that repeats until the user correctly guesses the random number. Use while loop, cout and cin.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
