Matrix addition in C
Matrix addition in C language to add two matrices, i.e., compute their sum and print it. A user inputs their orders (number of rows and columns) and the matrices. For example, if the order is 2, 2, i.e., two rows and two columns and the matrices are:
First matrix:
1 2
3 4
Second matrix:
4 5
-1 5
The output is:
5 7
2 9
output:
Enter the number of rows and columns of matrix
2
2
Enter the elements of first matrix
1 3
2 3
Enter the elements of second matrix
4 5
6 7
Sum of entered matrices:-
5 8
8 10
need an explanation for this answer? contact us directly to get an explanation for this answer