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 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 the sample runs:

|(0, 100) p2 pl |(0,0) (200, 0) Enter a point's x- andy-coordinates: 100.5 25.5 The point is in the triangle JEnter

image

|(0, 100) p2 pl |(0,0) (200, 0) Enter a point's x- and y-coordinates: 100.5 25.5 The point is in the triangle JEnter

Step by Step Solution

3.41 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Output Enter a points x and y coordinates 1005 255 ... View full answer

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 Java Programming Questions!