I want you to compute the area of a triangle two different ways,
checking intermediate values,
and comparing the final results.
This problem requires only sequential code.
It needs no procedures or functions other than the builtin sqrt
function.
Make sure that you prompt the user of your program with good description of what you are asking for with each value read. Please verify your triangle coordinates by echoing back the values that you have read into your program. Also provide detailed descriptions for each of your results.
The corners of the triangle will be input as two points on a grid, the first corner of the triangle, point A will be at the origin (or 0,0) (Ax=0, Ay = 0). This will reduce the amount of input required.
Check your program with Bx = 0, By = 3, Cx = 4, and Cy = 0. The areas should be: A1 = A2 = 6.
The origin is corner A. (Ax=0, Ay = 0). The next point input, point B is represented by an X and a Y value (Bx, By). The last point C will be located by Cx, Cy.
With these values compute, print and verify the following: