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
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):

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:

>0 p2 is on the left side of the line x0)*(yl y0) { =0 p2 is on the same line (x1 x0)*(y2 y0) (x2
Step by Step Solution
3.37 Rating (169 Votes )
There are 3 Steps involved in it
Program plan Prompt the user enter the three points for p0 p1 and p2 Determine whether the p2 is on ... View full answer
Get step-by-step solutions from verified subject matter experts
