Professional Documents
Culture Documents
Assignment 2
Assignment 2
Assignment 2
Problem statement:
Write a program that will calculate the area of a triangle given the coordinates of all three
vertices. The following formula can be used to calculate the area:
( ) ( ) ( )
| |
B (bx, by)
Notes:
The absolute value of a double variable x can be computed by calling the library function
fabs(x). This function is defined the header file math.h
See the screenshots of the sample output provided with the assignment to learn the exact
format of the output.
Reference: http://www.mathopenref.com/coordtrianglearea.html