Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C language , write a program to calculate the area of various shapes based on the choice from the user. the program should provide

In C language , write a program to calculate the area of various shapes based on the choice from the user.

the program should provide the user with a menu to select from

R-for retangle

T-for trapezoid

C-for circle

E-for end

the program should ask the for the proper input for every particular shape

A sample output may look like

This can fined the area of the following shapes :

R-rectangle

T-Trapezoid

C-Circle

E-End

Select your choice (R,T,C or E to end : R

Enter length : 50

Enter height : 20

The area of the rectangle is 1000.00 m^2

-------------------------------------------------------------------------

This can fined the area of the following shapes :

R-rectangle

T-Trapezoid

C-Circle

E-End

Select your choice (R,T,C or E to end : T

Enter base 1 : 20

Enter base 2 : 10

Enter height : 5

The area of the trapezoid is 75.00 m^2

-------------------------------------------------------------------------

This can fined the area of the following shapes :

R-rectangle

T-Trapezoid

C-Circle

E-End

Select your choice (R,T,C or E to end : C

Enter radius : 50

The area of the circle is 7857.14 m^2

-------------------------------------------------------------------------

This can fined the area of the following shapes :

R-rectangle

T-Trapezoid

C-Circle

E-End

Select your choice (R,T,C or E to end : e

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

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

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions

Question

c. What were the reasons for their move? Did they come voluntarily?

Answered: 1 week ago

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago

Question

What were the issues and solutions proposed by each team?

Answered: 1 week ago

Question

Were all members comfortable brainstorming in front of each other?

Answered: 1 week ago