To find the sum of two matrices, here we used two dimensional arrays to define a matrix and then using loops the addtion of elements is done.
Inputs to the script
User has to enter matrix size and elements, or it can be fixed while declaring
By looping through elements the multiplication is done.
Output of the script
We will get sum of the matrix in matrix form
Outut is here
///// addition is over , now display the result //
Subtraction of matrix
In the above code we will replace the addition with subtraction.
Check this line
Change this line like this
Your output is here
Multiplication of Matrix