Assignment 2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CSE-1214: Assignment-2

 Last date of submission: Saturday, 18th July, 2020, 5:00 PM


 The name of your script should be “2_*.c”
(„*‟ should be replaced by your group number)
 Submit your assignment in the Google Classroom‟s assignment page. Do not
email me the assignment.
 Maintain indentation and proper coding convention in your code.

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)

A (ax, ay) C (cx, cy)

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

You might also like