void main() { int x,y,i,j; int cols; int rows; char ch; do { ..... cout<<"\n*********************************************************"<<endl; cout<<"\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl; cout<<"\n*********************************************************"<<endl; cout<<"\nTHIS ASSIGNMENT IS TO COVER THE FOLLOWING: "<<endl; cout<<"\n > Find and displaying Determinant"<<endl; cout<<"\n > Find and displaying the Inverse"<<endl; cout<<"\n matrix"<<endl; cout<<"\n > Carrying out row transformation"<<endl; cout<<"\n > Addition & Subtraction"<<endl; cout<<"\n > Multiplicationn & division"<<endl; cout<<"\n"<<endl; cout<<"\n1.Add matrices\n2.Subtract matrices\n3.Multiplymatrices\n4.Find determinant\n5.Find INverse"<<endl; cout<<"Select any one above , then hit ENTER"<<endl; cin>>x; if(x==1) {cout<<"enter the dimension of matrix A:"; cin>>rows>>cols; Matrix A ;//= Matrix(rows, cols); cout<<"enter the elements of matrix A:"; for (int r = 0; r < rows; r++) { for (int c = 0; c < cols; c++) { cin>>A(r,c); } } cout<<"enter the dimension of matrix B:"; Matrix B = Matrix(cols, rows); cout<<"enter the elements of matrix B:"; for (int r=0;r<rows;r++) { for (int c=0;c<cols;c++) { cin>>B(r,c); } ............. } else if(x==2) { cout<<"enter the dimension of matrix A:"; cin>>rows>>cols; Matrix A = Matrix(cols, rows); cout<<"enter the elements of matrix A:"; for (int r=0;r<rows;r++) { for (int c=0;c<cols;c++) { cin>>A(r,c); } } Matrix B = Matrix(cols, rows); cout<<"enter the elements of matrix B:"; for (int r=0;r<rows;r++) { for (int c=0;c<cols;c++) { cin>>B(r,c); } } Matrix C; C = A - B; printf("A - B = \n"); C.Print(); printf("\n"); } else if (x==3) { cout<<"enter the dimension of matrix A:"; cin>>rows>>cols; Matrix A = Matrix(cols, rows); cout<<"enter the elements of matrix A:"; for (int r=0;r<rows;r++) { for (int c=0;c<cols;c++) { cin>>A(r,c); } } Matrix B = Matrix(cols, rows); cout<<"enter the elements of matrix B:"; for (int r=0;r<rows;r++) { for (int c=0;c<cols;c++) { cin>>B(r,c);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)