Facebook
From Edgy Mockingbird, 3 Years ago, written in Java.
Embed
Download Paste or View Raw
Hits: 162
  1.         int[][] tab = new int[5][5];
  2.         int liczba = 10;
  3.  
  4.         for (int x = 0; x < tab.length; x++) {
  5.             for (int y = 0; y < tab[x].length; y++) {
  6.                 tab[x][y] = liczba;
  7.                 liczba++;
  8.                 if (x == y) {
  9.                     System.out.print(tab[x][y] + " ");
  10.                 } else {
  11.                     System.out.print("  ");
  12.                 }
  13.  
  14.             }
  15.             System.out.println();
  16.         }