Question
Using c Write a program that generates a random number between -100 to 100 and requires that the user guesses which number was generated. If
Using c
Write a program that generates a random number between -100 to 100 and requires that the user guesses which number was generated. If the user guesses too high, then the program should say so. If the user guesses too low, then the program should say so again. The program should continue to loop until the user guesses the correct number. If the user guesses a number outside the range of -100 to 100, then the program should just prompt the user to re-enter a number without indicating if the guess was too high or too low. Keep track of the total number of guesses taken by the user. Use nested loops to solve this problem. Use functions where appropriate!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started