/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package listaexercicios;

/**
 *
 * @author awolf
 */
public class Questao26 {

    public static void main(String[] args) {
        int m1[][] = {
            {1, 1},
            {2, 2}
        };

        int m2[][] = {
            {3, 3},
            {4, 4}
        };

        System.out.print("\nMatriz 1");
        Questao27.imprimeMat(m1);
        
        System.out.print("\nMatriz 2");
        Questao27.imprimeMat(m2);

        int m3[][] = new int[m1.length][m1[0].length];
        for (int i = 0; i < m1.length; i++) {
            for (int j = 0; j < m1[i].length; j++) {
                m3[i][j] = m1[i][j] + m2[i][j];
            }
        }

        System.out.print("\nMatriz 3");
        Questao27.imprimeMat(m3);

    }
}
