Question: Solve it using JAVA Problem 1 [ 3 marks ] : Points in a Circle Write a program that prompts the user to enter a

Solve it using JAVA
Problem 1[3 marks] : Points in a Circle
Write a program that prompts the user to enter a point (x,y) and checks whether the
point is within the circle centered at (0,0) with radius 10. For example, (4,5) is inside
the circle and (9,9) is outside the circle, as shown in the Figure below. (Hint: A point is
in the circle if its distance to (0,0) is less than or equal to 10.
The formula for computing the distance is:
(x2-x1)2+(y2-y1)22
Sample Input/Output
Enter a point with two coordinates: 45
Point (4.0,5.0) is in the circle
Enter a point with two coordinates: 99
Point (9.0,9.0) is not in the circleSol
 Solve it using JAVA Problem 1[3 marks] : Points in a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!