Java program to subtract two matrices

In this post, we will see how to subtract two matrices in java.I am giving example for 33 matrix. You can extend it to nn matrices.

Output:

Enter Matrix 1 Elements : 11 22 33 44 55 66 77 88 99
Enter Matrix 2 Elements : 10 20 30 40 50 60 70 80 90
New Matrix is :
1 2 3
4 5 6
7 8 9

Was this post helpful?

Leave a Reply

Your email address will not be published. Required fields are marked *