View Code of Problem 67

#include <stdio.h>
int main()
{
	int x[4], y[4], i;
	float k1, k2;
	while (1)
	{
		for (i = 0; i < 4; i++)
		{
			scanf("%d%d", &x[i], &y[i]);
		}
		k1 = (y[1] - y[0])*1.0 / (x[1] - x[0]);
		k2 = (y[3] - y[2])*1.0 / (x[3] - x[2]);
		if (k1 == k2)
			printf("No\n");
		else
			printf("Yes\n");
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 67