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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started