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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!