Question: Write a function named TriangleArea, which takes in three parameters a, b, and c, all of type double and returns the area of the triangle,

 Write a function named TriangleArea, which takes in three parameters a,

Write a function named TriangleArea, which takes in three parameters a, b, and c, all of type double and returns the area of the triangle, which is also of type double. Assume that the function named squareroot is available via math.h. Also write the main function which calls TriangleArea. Remember only two functions, main and TriangleArea are required. The function calculates the area from a, b, c as follows: First, it calculates s = 0.5 * (a + b + c). Then, it calculates area = squareroot (s * (s - a) * (s - b) * (s - c))

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!