Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class programm1
- {
- public static void main (String [] args)
- { //startmethod main
- double zahl = 0;
- double zahl1 = 0;
- System.out.print("Bitte 1. Zahl eingeben: ");
- zahl = TerminalInput.readDouble();
- System.out.print("Bitte 2. Zahl eingeben: ");
- zahl1 = TerminalInput.readDouble();
- if (zahl > zahl1)
- System.out.println("1. Zahl " + zahl + " ist groesser als 2. Zahl " + zahl1);
- else
- { //startif1
- if (zahl < zahl1)
- System.out.println("2. Zahl " + zahl1 + " ist groesser als 1. Zahl " + zahl);
- else
- { //startif2
- if (zahl == zahl1)
- System.out.println("1. Zahl " + zahl + " und 2. Zahl " + zahl1 + " sind gleich");
- } //endif2
- } //endif1
- } //endmethod main
- } //endclass programm1
Add Comment
Please, Sign In to add comment