Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (1<=k && k<=15){ // Erste Zeile darstellen
- IO.print (" |");
- for (y=1; y<=k; y++) {
- IO.print (y, 4);
- }
- IO.println (" ");
- IO.print ("---+"); // Vertikale Tabellenlinie
- for (y=1; y<=k; y++) {
- IO.print ("----");
- }
- IO.println(" ");
- for (x=1; x<=k; x++) { // Erste Spalte darstellen
- IO.print (x, 3);
- IO.print ("|");
- for (y=1; y<=k; y++) { // Werte berechnen und eintragen
- IO.print (x-y, 4);
- }
- IO.println (" ");
- }
- }
- else
- IO.print ("Die eingegebene Zahl ist nicht gueltig");
Add Comment
Please, Sign In to add comment