Question: C++ code The area of a triangle can be calculated given its base and height, or given the lengths of its sides. You can find
C++ code

The area of a triangle can be calculated given its base and height, or given the lengths of its sides. You can find the formulas for each of these methods on the web. Write a program with two overloaded functions both named triangleArea. In main, randomly ask the user to enter either base and height or the lengths of the three sides and then make the appropriate call to triangleArea. triangleArea should return the area to main where it will be displayed. The program should contain an outer loop which asks if the user wishes to continue. A typical run would be: CWindows system321cmd.exe Enter base and height of a triangle 24 18 The area is 216 Run again? or N Enter the lengths of the sides of a triangle. 18 30 24 The area is 216 Run again? or N Enter the lengths of the sides of a triangle. 20 28 34 The area is 279.912 Run again? or N Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
