Question: The subsequent function computes the area of a triangle, but contains three errors. Find the errors and fix them.
Hint: There are no errors in the formula.
void triangle_area(double base, height)
double prod;
{
prod = base * height;
return (prod/2);
}
For your solution to Problem 1, you will need to (i) find each of the errors, and (ii) write the right function (just the function; not the complete program).
The solution must be error free and compile correctly on first attempt.