Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Solve it in MATLAB please 2. (50 points) Write a function named as sumofangles involving a switch/case structure that performs the following tasks: prompts the

image text in transcribedSolve it in MATLAB please

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

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions