Question: C++ In the Cartesian coordinate system on the plane, the coordinates of the vertices of the triangle and one more point are given. Determine whether
C++
In the Cartesian coordinate system on the plane, the coordinates of the vertices of the triangle and one more point are given. Determine whether this point belongs to the triangle.
Input In four lines there are pairs of numbers - the coordinates of the points. The numbers in the first three lines are the coordinates of the vertices of the triangle, in the fourth line the coordinates of the point being tested.
Input Print the word "In" if the point is inside the triangle, or "Out" - if outside.
Restrictions Coordinates of vertices are integers, for any point the following conditions are fulfilled: -10 <= x, y <= 10 000.
Input 0 0 100 0 0 100 100 100
Input Out
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
