c判断三个点在一条直线上有什么问题?
#include<stdio.h>int main(void)
{
int x1,x2,x3,y1,y2,y3,;double i,j,k,h,m,n;
i=(x1-x2);j=(x2-x3);k=(x1-x3);h=(y1-y2);m=(y1-y3);n=(y2-y3);
printf("please input three coordinates:");
scanf("%d,%d %d,%d %d,%d",&x1,&y1,&x2,&y2,&x3,&y3);
if((h/i==n/j&&h/i==m/k)
{
printf("in a line");
}
else
printf("not in a line");
return(0);
}