technotip.com/7151/c-program-t...
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
technotip.com/6378/c-programmi...
C Programming: Beginner To Advance To Expert
technotip.com/6086/c-programmi...
Негізгі бет C Program To Check If Three Points Are On Same Straight Line
Пікірлер: 4