You are viewing a single comment's thread. Return to all comments →
int[][] m1 = { {1, 2, 3}, {2,3,4} , {1,1,1} }; int[][] m2 = { {4,5,6}, {7,8,9},{4,5,7} }; int[][] sum = new int[3][3]; for(int i=0;i<3;i++){ for(int j=0;j<3;j++){ sum[i][j] = m1[i][j] + m2[i][j]; System.out.println(sum[i][j]); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Linear Algebra Foundations #1 - Matrix Addition
You are viewing a single comment's thread. Return to all comments →