View Code of Problem 67

#include<stdio.h>
#include<math.h>

int main(){
	int k1,k2;
	int x[4]={0},y[4]={0};
	
	while(scanf("%d%d%d%d",&x[0],&y[0],&x[1],&y[1]))
	{
		k1=k2=0;
		scanf("%d%d%d%d",&x[2],&y[2],&x[3],&y[3]);
		k1=(y[0]-y[1])/(x[0]-x[1]);
		k2=(y[2]-y[3])/(x[2]-x[3]);
		if(k1==k2)
			printf("No\n");
		else 
			printf("Yes\n");
	}

	return 0;
}

Double click to view unformatted code.


Back to problem 67