
what is the code for multiplying the values in a 2d array and printing out their sum

public class MultiplicationTable{
public static void main(String[] args){
int sum=0;
int[][] array = new int[11][11];
for(int i=1; i<array.length; i++) {
for(int j=1; j<array[i].length; j++){
array[i][j] = i*j;
sum+=array[i][j];
System.out.print(" " + array[i][j]);
}
System.out.println("");
}
System.out.println(sum);
}
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.