Write an m-file that will play the Guess My Number Game with the user. The program generates
Question:
Write an m-file that will play the “Guess My Number Game” with the user. The program generates a random integer in a specified range, and the user (the player) has to guess the number. The program allows the user to play as many times as he/she would like; at the conclusion of each game, the program asks whether the player wants to play again. The basic algorithm is:
Start by printing instructions on the screen.
For every game
Prompt the user for minimum and maximum values.
Generate a random integer between these two values (inclusive). Be sure not to display this!
Prompt the user to guess the number. For each guess, the game tells the user whether their guess was too low, too high, or correct. If the user is incorrect, prompt for another guess.
When the user guesses the correct number? Clear the command window? Tell the user that they guessed the correct number? Display the total number of guesses for that game? Ask the user if they would like to play again. You can do this by prompting for an input, 1 for yes and 0 for no.