Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class KreisMain {
- public static void main(String[] args) {
- Kreis Kreis1 = new Kreis();
- Kreis Kreis2 = new Kreis();
- double x = Kreis2.x - Kreis1.x;
- double y = Kreis2.y - Kreis1.y;
- double radius = Kreis2.radius - Kreis1.radius;
- double a = (x * x) + (y * y);
- double A = Math.sqrt(a);
- if (a < radius) {
- System.out.println("Die Kreise überschneiden sich.");
- } else {
- System.out.println("Die Kreise überschneiden sich nicht.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement