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
Get step-by-step solutions from verified subject matter experts
