Question: Write a MATLAB program by hand using switch / case structure to computes the area of a circle and a triangle. Start by asking the
Write a MATLAB program by hand using switchcase structure to computes the area of a circle and a triangle. Start by asking the user to enter to calculate area of circle and to calculate area of triangle. Use switchcase statements based on user inputs and ask appropriate parameters to compute the area for each shape. For instance, for circle, you will need to ask for the radius, for the triangle you will need to ask user for the base and the height, then use the appropriate statements to show the area for the shape. Area of circle is pi& and area of triangle is Use otherwise statement if the input is not a or a
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
