We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent1fcbde2 commitc9c726dCopy full SHA for c9c726d
Exercise_03/Exercise_03_29/Exercise_03_29.java
@@ -1,8 +1,8 @@
1
/*
2
(Geometry: two circles) Write a program that prompts the user to enter the center
3
coordinates and radii of two circles and determines whether the second circle is
4
-inside the first or overlaps with the first, as shown in Figure 3.10. (Hint: circle2 is
5
-inside circle1 if the distance between the two centers6= |r1 - r2| and circle2
+inside the first or overlaps with the first, as shown in Figure 3.12. (Hint: circle2 is
+inside circle1 if the distance between the two centers <= |r1 - r2| and circle2
6
overlaps circle1 if the distance between the two centers <= r1 + r2. Test your
7
program to cover all cases.)
8
*/
@@ -31,4 +31,4 @@ else if (Math.pow(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2), 0.5)
31
else
32
System.out.println("circle2 does not overlap circle1");
33
}
34
-}
+}