Hey all. Got a problem. I'm writing a program that takes the coordinates for 3 points and I'm supposed to identify whether or not the points in relation to eachother are collinear or not. For example, I have points

(x1, y1) (x2, y2)(x3, y3)

If the points were collinear, the slope between pt1 and pt2 would be the same as the slope between pt2 and pt3.

My code so far gives me this error

Code:

collinear.c: In function `main':
collinear.c:17: error: invalid lvalue in assignment

And here's my code so far

Code:

#include <stdio.h>
#include <math.h>
main()
{
double x1;
double y1;
double x2;
double y2;
double x3;
double y3;
printf("Enter coordinates for 3 points--x1 y1 x2 y2 x3 y3\n");
scanf("%lf %lf %lf %lf %lf %lf", &x1, &y1, &x2, &y2, &x3, &y3);
if(((y2 - y1)/(x2 - x1)) = ((y3 - y2)/(x3 - x2)))
{
printf("The points entered are collinear\n");
}
else
{
printf("The points entered are not collinear\n");
}
}