Java program to add two matrices
Java program to add two matrices
Output:
Enter the row size: 3
Enter the column size: 3
Enter the elements of matrix A:
1 2 3
4 5 6
7 8 9
Enter the elements of matrix B:
1 2 3
4 5 6
7 8 9
The resultant matrix is
2 4 6
8 10 12
14 16 18
Implementation: