Question: Write a C++ program that calculates the area of a triangle using the lengths of the sides (Heron's formula). The program should read (input) the

Write a C++ program that calculates the area of a triangle using the lengths of the sides (Heron's formula). The program should read (input) the three sides of the triangle and check if the triangle is valid first. A triangle is valid if the sum of any two sides is greater than the third. Your program should run continuously until the user decides to quit. (Hint: use a do-while loop with y questions) Display an error message if the triangle is not valid. Display the area using two decimal places. The area of the triangle can be calculated using the following formulas: S = siden + side2 + side3 2 area = s(s sidel)(s side2)(s side3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
