Question: in C++ Write a program to calculate area of common geometric shapes shown in Figure 1. The program should give the user the option to

 in C++ Write a program to calculate area of common geometricshapes shown in Figure 1. The program should give the user the

option to choose from rectangle, circle, or triangle. Create functions representing each

in C++

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=ar2 Triangle A = ah/2 Figure 1: Common geometric shapes C:\Users\FAID\Desktop\Teaching and Learning\Session 2020_2021 Sem 1\Computer Programming (BITG 1233) 07. Assignment Questi... Calculate or find min-max area of: 1 Rectangle 2 - Circle 3 Triangle 4 - 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: 1 - Rectangle 2 - Circle 3 - Triangle 4 - Show smallest and largest area Your selection: 4 No largest No smallest Do you want to repeat the whole process (Y/N): y Calculate or find min-max area of: 1 Rectangle 2 - Circle 3 - Triangle 4 - Show smallest 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 min-max area of: 1 Rectangle 2 - Circle 3 - Triangle 4 - Show smallest and largest area Your selection: 2 r: 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: 1 - Rectangle 2 - Circle 3 - Triangle 4 - Show smallest and largest area Your selection: 3 a: 3 h: 3 Area of a triangle: 4.5 Do you want to repeat the whole process (Y/N): Y Calculate or find min-max area of: 1 - Rectangle 2 - Circle 3 - Triangle 4 - Show smallest and largest area Your selection: 4 Largest area is 12.568 of geometric shape Circle Smallest area is 1 of geometric shape Rectangle Do you want to repeat the whole process (Y/N): n Process exited after 31.03 seconds with return value o 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!