Question: MATLAB FORMAT ONLY Problem 1 (20 Points) - Branches Write a script that requests the user to enter a response to the following question: Would
MATLAB FORMAT ONLY
Problem 1 (20 Points) - Branches Write a script that requests the user to enter a response to the following question: Would you like to the solution to the area of a circle or volume of a sphere? Have the user enter either circle or sphere Depending on the selection do one of the following 1) The script should ask the user to enter radius (dimensions inches) and calculate Area of a circle A -tr2 and fprintf the solution to the command window with units equal to inches squared. Ask user to enter radius (dimensions inches) and calculate the Volume of a Sphere V Tr3 in units of in3, unless the volume is greater than 100 in3, then calculate 2) 4 3 and display the answer in units of f Tell the user the input was invalid 3) Demonstrate your program for: 1) circle of radius 4 inches, 2) sphere of radius 2.5 inches and 3) sphere of radius 15 inches
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
