/*
 * 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 Questao34 {

    public static double somaMatDouble(double mat[][]) {
        double soma = 0;
        for (int i = 0; i < mat.length; i++) {
            for (int j = 0; j < mat[i].length; j++) {
                soma = soma + mat[i][j];
            }
        }

        return soma;
    }

    public static void main(String[] args) {
        double mat[][] = {
            {2.0, 3.56, 12.2},
            {2.0, 3.2, 4}
        };

        double soma = somaMatDouble(mat);
        System.out.println(soma);
    }
}
