Given a directed line from point p0(x0, y0) to p1(x1, y1), you can use the following condition

Question:

Given a directed line from point p0(x0, y0) to p1(x1, y1), you can use the following condition to decide whether a point p2(x2, y2) is on the left of the line, on the right, or on the same line (see Figure 3.11):

image

Write a program that prompts the user to enter the three points for p0, p1, and p2 and displays whether p2 is on the left of the line from p0 to p1, on the right, or on the same line. Here are some sample runs:

image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: