Q10 Give three points (x1, y1), (x2, y2) and (x3, y3), write a program to check if all the three points fall on one straight line.
Program: 78
Give three points (x1, y1), (x2, y2) and (x3, y3), write a c program to check if all the three points fall on one straight line.
Output:
Enter the co-ordinates of first point (X1, Y1): -3 4
Enter the co-ordinates of second point (X2, Y2): 3 2
Enter the co-ordinates of third point (X3, Y3): 6 1
ab: 6.324555 bc: 3.162278 ac: 9.486833
ab + bc = ac
All the three points fall on one straight line.