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.

(c++) create a program that generates a random number from 1 to

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

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!