Question: 2. (50 points) Write a function named as sumofangles involving a switch/case structure that performs the following tasks: prompts the user (with input function) to

 2. (50 points) Write a function named as sumofangles involving a

2. (50 points) Write a function named as sumofangles involving a switch/case structure that performs the following tasks: prompts the user (with input function) to enter one of the following shapes: triangle square pentagon hexagon - calculates the sum of the interior angles of the shape that the user inputs according to the following formula: (2) (180 degrees) where n is the number of sides of the geometric shape. - reports the result using fprintf as follows: The sum of the interior angles for a whatever the chosen Shape is" is whatever the sum ofangles is gives a warning message like "Try again' when no or incorrect input is supplied by the user. Also, draw a flowchart of your program. Due date: 29 December 2021

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!