C++ Program to Add Two Matrices

Here you will get C++ program to find addition of two matrices.

For example:

Matrix A:

3 7

2 5

Matrix B:

5 6

1 4

Addition of A and B is:

8 13

3 9

 

Program

 

Output

Enter no. of rows and cloumns of matrix A:2
2

Enter no. of rows and columns of matrix B:2
2
Matrices can be Added
Enter matrix A row wise:4 5
3 7

Matrix A:
4 5
3 7

Enter Matrix B row wise:2 1
8 2
Matrix B:
2 1
8 2

Sum of Matrices A and B:
6 6
11 9

Leave a Comment

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