Program to add two Matrices
Addition of two matrices is the simplest operation one can perform on matrices. It just requires the basic knowledge of addition of numbers. One must also keep in mind that only the like matrices can be added together. By the term “LIKE” I mean that only the matrices with same number of rows and columns. Follow on with the examples given below to first understand the addition of two matrices: Consider the following two matrices which are being added: To add them just add the pairs of entries, and then simplify for the final answer: So the answer is: Running Program Code: #include<iostream.h> #include<process.h> #include<iomanip.h> #include<conio.h> const int max= 10 ; void line(int); void main() { clrscr(); char ch; int A[max][max],B[max][max],C[max][max],m,n,i,j; cout<< "\n\n\t\tTHIS WILL ADD TWO MATRICES\t\t\n" <<endl; cout<< "\n\nFor adding two matrices, both should be square matrix...