Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
21 lines (16 loc) · 424 Bytes

File metadata and controls

21 lines (16 loc) · 424 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package array;
public class Calculation {
public static void main(String[] args) {
int mat1[][] = {{16,23,23},{2,3,4},{34,32,23}};
int mat2[][] = {{34,45,33},{6,7,8},{21,22,23}};
int mat3[][] = new int[3][3];
// addition
for (int i = 0; i<3; i++ ) {
for (int j = 0; j<3; j++ ) {
mat3[i][j] = mat1[i][j] + mat2[i][j];
System.out.print(mat3[i][j]+ " ");
}
System.out.println();
}
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.