Question: ( x 2 , Y 2 ) is given by d = ( x 2 - x 1 ) 2 + ( y 2 -

(x2,Y2) is given by
d=(x2-x1)2+(y2-y1)22
Three points in the Cartesian plan can form a triangle only if the sum of the distances between any two pairs of points is strictly greater than the distance between the third pair of points.
Write a C function that takes as arguments three pairs of points and return 1 if the three points do form a valid triangle and 0 otherwise
For example:
Test
Input Result
printf("%d", istriangle (3,2,-2,-3,2,3)
2
3
 (x2,Y2) is given by d=(x2-x1)2+(y2-y1)22 Three points in the Cartesian plan

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!