Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started