Question: Write a C program that asks the user to guess a number between 1 and 1 0 0 . The program should use a do
Write a C program that asks the user to guess a number between and The program should use a dowhile loop to repeatedly prompt the user for their guess until they correctly guess the number.
Program Requirements:
The program should generate a random number between and at the beginning of each run.
You should use time and srand for your project.
The user should be prompted to enter their guess.
If the user's guess is correct, display a message and the number of attempts it took to guess correctly.
If the user's guess is incorrect, display a hint higher or lower and ask for another guess.
The program should continue prompting for guesses until the user correctly guesses the number.
Properly handle invalid guesses and
Use a dowhile loop to handle repeated guessing until the correct answer is provided.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
