Question 2:
(1 mark, file to be edited: Q2.c)
Write a program to add 2 matrices A and B. Two matrices A and B have N rows and M columns.
Input
3 of 3
Paper No: 1
The first line contains N and M (1 ≤ N, M ≤ 100).
The next N lines are the first matrix ANX.M. (0 ≤ i ≤ N-1, 0 ≤ j ≤ M-1,-10° ≤ a ≤ 109).
The last N lines are the second matrix BNxM, (0 ≤ i ≤ N-1, 0 ≤ j ≤ M-1,-10° ≤ bij ≤ 10°).
Output
Please print out the additional result.
Sample
Below is an example of how the program will run:
Sample 1
22
1 2
3 4
21
4 3
Zoom
+ 75%
Close