Question: Write a program that generates a random number between 0 and 1 0 0 . The program prompts the user to enter a number continuously

Write a program that generates a random number between 0 and 100. The program prompts the
user to enter a number continuously until the number matches the randomly generated number. For
each input, the program tells the user whether the input is too low or too high, so the user can
make next better guess.
Sample Run
Guess a magic number between 0 and 100:
Enter your guess: 50
Your guess is too high
Enter you guess: 25
Your guess is too low
Enter your guess: 42
Your guess is too high
Enter you guess: 39
Yes, you got it!! the number is 39 Write a program in C++ that generates a random number between 0 and 100.The program prompts the user to enter a number continuously until the number matches the randomly generated number. For each input, the program tells the user whether the input is too low or too high, so the user can make next better guess.
Sample Run
Guess a magic number between 0 and 100:
Enter your guess: 50
Your guess is too high
Enter you guess: 25
Your guess is too low
Enter your guess: 42
Your guess is too high
Enter you guess: 39
Yes, you got it!! the number is 39
 Write a program that generates a random number between 0 and

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!