Advertisement
joseleonweb

Untitled

Oct 31st, 2019
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. int [][] matriu = {{23,45,11,2},{67,2},{1,2,3,4,5,6}};
  2. System.out.println("Aquests són els valors que conté la matriu: ");
  3. for (int i = 0; i < matriu.length; i++) { //i = posició fila
  4.     System.out.println("\n\n\tEls valors que hi ha a la fila " + i + " són: ");
  5.     for (int j = 0; j < matriu[i].length; j++) {
  6.         System.out.println("\n\t\tEn la columna " + j + ": " + matriu[i][j]);
  7.     }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement