C Program To Check If Three Points Are On Same Straight Line
Satish B
http://technotip.com/7151/c-program-to-check-if-three-points-are-on-one-straight-line/
Given 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.
Note: (x1, y1), (x2, y2) and (x3, y3) are called co-ordinates of x and y axis.
Formula To Calculate Slope of 2 points Slope of points (x1, y1) and (x2, y2) = m;
m = (y2 – y1) / (x2 – x1);
Slope of points (x2, y2) and (x3, y3) = n;
n = (y3 – y2) / (x3 – x2);
C Programming Interview / Viva Q&A List http://technotip.com/6378/c-programming-interview-viva-qa-list/
C Programming: Beginner To Advance To Expert http://technotip.com/6086/c-programming-beginner-to-advance-to-expert/ ... https://www.youtube.com/watch?v=nC-jPDhDFT0
7889972 Bytes