Download Source Code here C++ Code for addition ,multiplication and Transpose of 2-D matrices Linked list implementation using C++ #include<iostream> using namespace std; int read(int[][5] ,int,int); int display(int[][5],int ,int); int mult(int [][5],int[][5],int[][5],int,int,int,int); int add(int[][5],int[][5] ,int[][5] ,int,int,int,int); int transpose(int [][5],int [][5],int,int); int main() { int mat1[5][5],mat2[5][5],mat3[5][5],r1,c1,r2,c2; cout<<"Enter size of 1st matrix : "; cin>>r1>>c1; cout<<"Size of 2nd matrix : "; cin>>r2>>c2; read(mat1,r1,c1); read(mat2,r2,c2); cout<<"Displaying 1st matrix :\n"; display(mat1,r1,c1); cout<<"Displaying 2st matrix :\n"; display(mat2,r2,c2); add(mat1,mat2,mat3,r1,c1,r2,c2); if(r1==r2&&c2==c1) { cout<<"Displaying addition of matrix :\n"; display(mat3,r1,c1); }...
Comments