Write a program that prompts the user to enter a point (x, y) and checks whether the
Question:
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 Figure 3.7a.
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)2. Test your program to cover all cases.) Two sample runs are shown below.
Figure?
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: