Question: How do I solve this in MATLAB? Question #10. Write a script that generates a secret number that is a random integer between 1 and
How do I solve this in MATLAB?

Question \#10. Write a script that generates a "secret number" that is a random integer between 1 and 10. Prompt the user to guess the secret number. If the user guesses the correct number, output a congratulatory message. If the user does not guess the correct number, state how many numbers too high or how many numbers too low the guess was. These numbers below are randomized. Each of the six sample runs has a different secret number. Your output will have a different secret number each time the script runs. Command Window Output Guess a number between 1 and 10: 5 You guessed 3 too low. Guess a number between 1 and 10: 5 You guessed 3 too high. Guess a number between 1 and 10: 4 You guessed 1 too low. Guess a number between 1 and 10: 6 You guessed 1 too high. Guess a number between 1 and 10: 5 You guessed 2 too low. Guess a number between 1 and 10: 8 Yes, 8 is the secret number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
