Implementing Subtraction of Matrices Using 2D-Arrays:

original post

In the above program the code can be shortened by reducing the number of for loops or by using functions, but for making it easier to understand by the beginners, the program is made as simple as possible. Some of the different Sample Outputs of the above program are shown below:

Sample Output:

Matrix Subtraction Output_1