Question: Example 2 In MATLAB PLEASE... Write a program that will calculate the area of a rectangle or the surface area and volume of a box.

Example 2 In MATLAB PLEASE...

Write a program that will calculate the area of a rectangle or the surface area and volume of a box.

a.The script should use a menu and switch-case statement to ask the user if they want do the rectangle or box calculations.

i.If the rectangle is chosen the user should be asked to enter a base and width

ii.If the box is chosen they should enter base, width, and length

b.A variable input/output function should be written to return either the area of the rectangle or the surface area and volume of the box

c.The output should be displayed with a nicely formatted fprintf

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!