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.

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.