Question: use c++ array and function Write a program to calculate area of common geometric shapes shown in Figure 1. The program should give the user

use c++ array and function

use c++ array and function Write a program to calculate area of

common geometric shapes shown in Figure 1. The program should give the

Write a program to calculate area of common geometric shapes shown in Figure 1. The program should give the user the option to choose from rectangle, circle, or triangle. Create functions representing each geometric shape which calculates and refer (pass by reference) the value of the area. Add another function to find the smallest and largest area of calculated geometric shapes. The program should also allow the user to repeat the whole process all over again. The sample output is given as in Figure 2. Rectangle Circle A = ab A= r2 TE Triangle A = ah/2 calculate or find in area of 1 Rectangle 2 - Circle 3 - Triangle Show smallest and largest area Your selection: b wrong selection! Do you want to repeat the whole process (Y/N): y Calculate or find min-max area of: Rectangle 2 - Circle 3 - Triangle Show smallest and largest area Your selection: 4 o largest No smallest Do you want to repeat the whole process (Y/N): y Calculate or find minix area of: 1 Rectangle 2 Circle 3 - Triangle 4 - Show sellest and largest area Your selection 1 a: 1 b: 1 Area of a rectangle: 1 Do you want to repeat the whole process (Y/N): Y Calculate or find in ax area of: Rectangle 2 - Circle 3 - Triangle Show smallest and largest area Your selection: 2 Area of a circle: 12.568 Do you want to repeat the whole process (Y/N): Y Calculate or find min-max area of: Rectangle 2 Circle 3 - Triangle 4 - Show sellest and largest area Your selection: 3 hi 3 Area of a triangle: 4.5 Do you want to repeat the whole process (Y/N): y Calculate or find in ax area of: 1 - Rectangle 2 - Circle 3 - Triangle Show smallest and largest area Your selection: 4 Largest area is 12.568 of geometric shape Circle Sallest area is 1 of geometric shape Rectangle Do you want to repeat the whole process (Y/N): Process excited after 31.03 seconds with return value @ press any key to continue

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!