Guest User

Untitled

a guest
Jan 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. class programm1
  2. {
  3. public static void main (String [] args)
  4. { //startmethod main
  5. double zahl = 0;
  6. double zahl1 = 0;
  7.  
  8. System.out.print("Bitte 1. Zahl eingeben: ");
  9. zahl = TerminalInput.readDouble();
  10.  
  11. System.out.print("Bitte 2. Zahl eingeben: ");
  12. zahl1 = TerminalInput.readDouble();
  13.  
  14. if (zahl > zahl1)
  15. System.out.println("1. Zahl " + zahl + " ist groesser als 2. Zahl " + zahl1);
  16.  
  17. else
  18. { //startif1
  19. if (zahl < zahl1)
  20. System.out.println("2. Zahl " + zahl1 + " ist groesser als 1. Zahl " + zahl);
  21.  
  22. else
  23. { //startif2
  24. if (zahl == zahl1)
  25. System.out.println("1. Zahl " + zahl + " und 2. Zahl " + zahl1 + " sind gleich");
  26.  
  27. } //endif2
  28.  
  29. } //endif1
  30.  
  31. } //endmethod main
  32.  
  33. } //endclass programm1
Add Comment
Please, Sign In to add comment