Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package br.com.aulas;
- import java.util.Scanner;
- public class Matriz_4x4 {
- public static void main(String[] args){
- int l,c;
- int mat[][] = new int[4][4];
- Scanner entrada = new Scanner(System.in);
- for(l = 0;l <= 3;l++){
- for(c = 0; c <= 3; c++){
- System.out.print("Entre com o valor ["+l+":"+c+"]:");
- mat[l][c] = entrada.nextInt();
- }
- }
- System.out.println("---MATRIZ 4x4---");
- for(l = 0; l <= 3 ; l++){
- for(c = 0; c <= 3 ; c++){
- System.out.print(mat[l][c]+"");
- }
- System.out.println("");
- }
- }
- }
Add Comment
Please, Sign In to add comment