Question: Write a MATLAB program that allows a user to guess a number that MATLAB has randomly generated. Have the program internally generate a random integer
Write a MATLAB program that allows a user to guess a number that MATLAB has
randomly generated. Have the program internally generate a random integer within a
random range of values and allow the user to guess the number. If the user guesses
incorrectly, the program should offer a hint too high, too low, etcand allow the user to
guess again until they guess correctly. Once the user guesses correctly, the program
should notify the user that theyve guessed correctly, report how many guesses it took
for them to guess correctly, and then ask if they want to play the game again. If the user
wants to play again, the process repeats. Once the user no longer wants to play, the
program should display the performance history for that set of games as a plot number
of guesses required vsrange of values with each game being a data point
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
