Question: Write a MATLAB script (write using MATLAB) that prompts the user for an integer between 10 and 100 by displaying Enter an integer between 10

Write a MATLAB script (write using MATLAB) that prompts the user for an integer between 10 and 100 by displaying

"Enter an integer between 10 and 100:"

If the user enters a number (integer or not) outside this range, the following error will be displayed:

"Incorrect Entry. Number must be between 10 and 100."

If the entry is within range but not an integer, it will display:

"Incorrect Entry. Number must be integer."

In either of the above cases, the program will abort after the invalid entry. For a valid entry (for instance, 11) it will display the square of the number as follows:

"The square of your entry is 121"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!