Friday, May 21, 2010

Adding the TRANSPOSed MATRIX with original MATRIX

//Author Subhasis Nayak(MCA,BBA,G-TECH)
//date:-20-05-2010
/*adding the TRANSPOSed MATRIX with original matrix */
/*programming language C++*/
C Programming Language (2nd Edition)
#include
#include
int main(){
int i,j;
int arFirst[3][3];
int arSecon[3][3];

cout<<"Enter the value for Matrix\n";
for(i=0;i<3;i++){
    for(j=0;j<3;j++){
        cin>>arFirst[i][j];
        }
    }
 

cout<<"Displaying the Normal Matix\n";
for(i=0;i<3;i++){
    for(j=0;j<3;j++){
        cout<<<"\t";
        }
    cout<
    }


for(i=0;i<3;i++){
    for(j=0;j<3;j++){
        arSecon[i][j] = arFirst[j][i];
       
        }
   
    }

cout<<"Displaying the Transpose Matix\n";
for(i=0;i<3;i++){
    for(j=0;j<3;j++){
        cout<<<"\t";
        }
    cout<
    }

cout<<"ADDING THE Matrix TO ITS TRANSPOSE ONE \n";
for(i=0;i<3;i++){
    for(j=0;j<3;j++){
        cout<<<"\t";
       
        }
    cout<
    }

getch();
clrscr();

 return 0;
}

No comments:

Post a Comment