Question: USE MATLAB! USE MATLAB! QUESTION 1: Write a script areaMenu that will print a list consisting of Triangle, Circle, and Rectangle. It prompts the user

USE MATLAB!

USE MATLAB! USE MATLAB! QUESTION 1: Write a script areaMenu that will

print a list consisting of Triangle, Circle, and Rectangle. It prompts the

USE MATLAB!

QUESTION 1: Write a script areaMenu that will print a list consisting of Triangle, Circle, and Rectangle. It prompts the user to choose one, and then prompts the user for the appropriate quantities (e.g. the radius of the circle) and then prints its area with 2 decimal places. If the user enters an invalid choice, the script prints an error message and asks the user to enter a valid choice number. In fact, the script will keep prompting the user to enter a valid choice number if the entered choice number is outside the range. The following examples illustrate what you would expect to display: (red numbers indicate values entered by the user) >> areaMenu Menu 1. Triangle 2. Circle 3. Rectangle Please choose one: 5 **Invalid choice! ** Please choose one: 6 **Invalid choice! ** Please choose one: 2 Enter the radius of the circle: 4.1 The area of the circle is 52.81 >> areaMenu Menu 1. Triangle 2. Circle 3. Rectangle 4 Please choose one: **Invalid choice! ** Please choose one : 3 Enter the width of the rectangle: 8 Enter the length of the rectangle: 9 The area of the rectangle is 72.00 >> areaMenu Menu 1. Triangle 2. Circle 3. Rectangle Please choose one: 1 Enter the base of the triangle: 2 Enter the height of the triangle: 3 The area of the rectangle is 3.00

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!