Question: using C++ Write three different functions to compute the Area of three different geometrical figures: (a) Circle (with input parameter radius) (b) Rectangle (with two

using C++

  1. Write three different functions to compute the Area of three different geometrical figures: (a) Circle (with input parameter radius) (b) Rectangle (with two input parameters width and length) and (c) Triangle (with three input parameters: a, b and c where a, b and c are three sides of the triangle.

Declare and define these three functions, and call them suitably from main, and display the values of the areas of each three geometrical figures.

The formula for areas are as below:

Circle:

Area = (radius)2

Where define pi as a constant and its value is 3.1416 (approximate value)

Rectangle:

Area = length * width

Triangle:

Area =

Where, s = (a + b + c)/2

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!