Quote (Wallesmegusta @ Sep 7 2017 06:04pm)
no, it's much bigger. You need to put together all the numbers in the box, like the grey box gives a sum of 142.
so if you just iterate through the matrix you would just do:
int sum = 0;
for(int row = 0; row < matrix.length; row ++){
for(int col = 0; col < matrix[row].length; col++){
sum += matrix[row][col];
}
}
return sum;
this would add all the values in the matrix together.