Question: Suppose a right triangle is placed in a plane as shown below. The right-angle point is placed at (0, 0), and the other two points
Suppose a right triangle is placed in a plane as shown below. The right-angle point is placed at (0, 0), and the other two points are placed at (200, 0), and (0, 100).
Write a C++ program that reads from a file named "prog7-IN.txt" with x- and y-coordinates and determines whether the point is inside the triangle.
Program 7 triangle.jpg
Here are two sample runs.
Read Values from file: 100 25
The point (100, 25) is in the triangle.
Read Values from file: 100 250
The point (100, 250) is NOT in the triangle.
Note: The output should be displayed to the screen AND written to a file named prog7-OUT.txt
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
