This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package haus; | |
| public class Haus { | |
| public static boolean inRechteck(double px, double py, double olx, double oly, double urx, double ury) { | |
| return (px <= urx) && (py <= ury) && (px >= olx) && (py >= oly); | |
| } | |
| public static boolean inRaute(double px, double py, double cx, double cy, double b) { | |
| return (Math.abs(px-cx)+Math.abs(py-cy))<=b; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package helloworld; | |
| public class Durchschnitt { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| int gesamtmenge = 0; | |
| while (gesamtmenge < 1){ | |
| System.out.println("Bitte geben Sie die Anzahl der Werte an , fuer die sie das arithmethische Mittel berechnen wollen:"); | |
| gesamtmenge = Integer.parseInt(System.console().readLine()); |