Guest User

Untitled

a guest
Feb 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.72 KB | None | 0 0
  1.  
  2.      if (1<=k && k<=15){                           // Erste Zeile darstellen
  3.       IO.print ("   |");
  4.        for (y=1; y<=k; y++) {
  5.         IO.print (y, 4);
  6.        }
  7.        IO.println (" ");
  8.        IO.print ("---+");                       // Vertikale Tabellenlinie
  9.        for (y=1; y<=k; y++) {
  10.         IO.print ("----");
  11.        }
  12.        IO.println(" ");
  13.        for (x=1; x<=k; x++) {                   // Erste Spalte darstellen
  14.         IO.print (x, 3);
  15.         IO.print ("|");
  16.         for (y=1; y<=k; y++) {                  // Werte berechnen und eintragen
  17.          IO.print (x-y, 4);
  18.         }
  19.         IO.println (" ");
  20.        }
  21.      }
  22.      else
  23.      IO.print ("Die eingegebene Zahl ist nicht gueltig");
Add Comment
Please, Sign In to add comment