Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9c726d

Browse files
authored
Update Exercise_03_29.java
1 parent1fcbde2 commitc9c726d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Exercise_03/Exercise_03_29/Exercise_03_29.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
(Geometry: two circles) Write a program that prompts the user to enter the center
33
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
4+
inside the first or overlaps with the first, as shown in Figure 3.12. (Hint: circle2 is
5+
inside circle1 if the distance between the two centers <= |r1 - r2| and circle2
66
overlaps circle1 if the distance between the two centers <= r1 + r2. Test your
77
program to cover all cases.)
88
*/
@@ -31,4 +31,4 @@ else if (Math.pow(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2), 0.5)
3131
else
3232
System.out.println("circle2 does not overlap circle1");
3333
}
34-
}
34+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp