Question: Using Matlab 4.2 Number guessing Write code for a program that prompts the user to enter a number between 0 and 10. If the user

Using Matlab
4.2 Number guessing Write code for a program that prompts the user to enter a number between 0 and 10. If the user correctly guesses a number of your (the programmer's) own choosing, the program should display that they were suc- cessful. If not, you should prompt the user to try again until they are correct Extension . If the user enters a number outside of this range, remind them to only use numbers from 0 to 10 and try again Let the user know if their guess was higher or lower than the number If the user enters the same number twice in a row, let them know and prompt them to try again. If the user enters a sufficiently large negative number, exit the program and let them know they are a quitter. Only give the user a limited number of attempts. Be sure to let them know when they lose! Display how many guesses it took for the user to win
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
