Advertisement
bigMARAC

Matriz 01

Oct 22nd, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.45 KB | None | 0 0
  1. Scanner teclado = new Scanner(System.in);
  2.         double mat[][] = new double[5][5];
  3.         for (int l = 0; l < 5; l++) {
  4.             for (int c = 0; c < 5; c++) {
  5.                 System.out.println("Digite um número:");
  6.                 mat[l][c] = teclado.nextDouble();
  7.             }
  8.         }
  9.         for (int l = 0; l < 5; l++) {
  10.             for (int c = 0; c < 5; c++) {
  11.                 System.out.print(mat[l][c] + ", ");
  12.             }
  13.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement