Question: (c++) create a program that generates a random number from 1 to 100. Then ask the user to guess the random number 1) if the
(c++)
create a program that generates a random number from 1 to 100. Then ask the user to guess the random number
1) if the users guess is too high, then the program should print "too high, try again".
2)if the users guess is too low, then the program should print "too low, try again".
Use the loop to allow the user to keep entering guesses until they guess the random number correctly. Once they figure it, display the number of guesses used and congratulate the user.
HINT: MAKE SURE TO GENERATE THE RANDOM NUMBER ONLY ONCE; OTHERWISE, THEY WILL PROBABLY NEVER FINISH.

Start Generate random number User enters guess guess is low Yes- display "too low" No guess is high Yes-display "too high" No guess != random No End Program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
