Question: MATLAB A. Write a script that will calculate and display the log of a number. The number has to be less than or equal to
MATLAB
A. Write a script that will calculate and display the log of a number. The number has to be less than or equal to 10. Your program has to start by prompting the user for a positive number that is less than or equal to 10. Your script has to handle the following:
If the user enters a negative number or zero, the program will display an error message and terminate.
If the user enters a number that is greater than 10, the program asks again until the user enters a value less than or equal 10.
If the user enters a positive value that is less than or equal to 10, the script will calculate and display the log of the entered value.
B. Modify your script for the previous question so if the user enters a negative value, the program asks again - until the user enters a positive value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
