Suppose a right triangle is placed in a plane as shown below. The right-angle point is at
Question:
Suppose a right triangle is placed in a plane as shown below. The right-angle point is at (0, 0), and the other two points are at (200, 0), and (0, 100). Write a program that prompts the user to enter a point with x- and y-coordinates and determines whether the point is inside the triangle. Here are some sample runs:
Enter a point's x-and y-coordinates: 100.5, 25.5
The point is in the triangle
Enter a point's x- and y-coordinates: 100.5, 50.5
The point is not in the triangle
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Question Posted: