The question was Given three points (x1, y1), (x2, y2) and (x3, y3), write a program to check if all the three points fall on one straight line On compiling I'm getting the error called object " " is not a function or function pointer The program is as follows
#include <stdio.h>
int main()
{
int sidex1,sidex2,sidex3,sidey1,sidey2,sidey3 ;
printf("Type in the coordinates");
scanf("%d%d %d%d %d%d", &sidex1, &sidey1, &sidex2, &sidey2, &sidex3,
&sidey3);
if
(sidex1(sidey2-sidey3)+sidex2(sidey3-sidey1)+sidex3(sidey1-sidey2)==0)
printf("These coordinates lie on same line");
else
printf("These coordinates do not lie on a line");
}
I'm a complete Noob. Thanks for Help!
sidex1(sidey2-sidey3)supposed to be?intas a function pointersidex1bysidey2-sidey3?