Question: MATLAB Guess a Number project: Give a user 5 guesses to guess a random number 1) Ask the user their name and greet them by
MATLAB

Guess a Number project: Give a user 5 guesses to guess a random number 1) Ask the user their name and greet them by name. 2) Generate a random number between 1 and 30 3) Create a variable for the number of guesses, so it can be easily changed 4) In a loop a. Tell the user how many guesses are left and ask them to enter a number b. Tell the user if they have guessed too high, too low, or if they have guessed it c. If they have guessed the number, tell them that and what guess it was on..and then exit the program. 5) If the user has used up all their guesses and not ever guessed the random number, leave them a message before leaving the program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
