Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

Are you proud of yourself?

Answered: 1 week ago

Question

What KPIs would you consider using to evaluate employee growth?

Answered: 1 week ago

Question

What KPIs would you consider using to evaluate process efficiency?

Answered: 1 week ago

Question

What is the average revenue threshold for our best customers?

Answered: 1 week ago