Question: Write a function named which takes in three parameters a, b, and c, all of type double and returns the area of the triangle, which
Write a function named 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 sqrt 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 = sqrt (s * (s - a) * (s - b) * (s - c))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
