Computer Science, asked by aliachowdhury276, 10 days ago

Write a java program to find the distance between two points (x₁, y₁) and (x₂, y₂). Hints: Distance =√√(x₂-x₁)² + (y₂-y₁)²​

Answers

Answered by abhimkv177ghost
0

Input : a = 1, b = 1, c = 1, x1 = 1, y1 = 1, x2 = 1, y2 = 2

Output : yes

On applying (x1, y1) and (x2, y2) on a * x + b * y – c, gives 1 and 2 respectively both of which have the same sign, hence both the points lie on same side of the line.

Input : a = 1, b = 1, c = 1, x1 = 1, y1 = 1, x2 = 0, y2 = 0

Output : no

Similar questions