Here is the program to transpose the entered matrix. The program asks for the order (M, N) of the matrix Soon after entering the order, the cursor takes to the proper position in the screen to input the matrix. User need to hit ‘Enter’ button after each entry.

Logic : A simple logic lies here. We declare another matrix B with order (N, M). The first matrix is traced through the first entry, till the end. The member is copied to another matrix with interchanging the column and rows count. Finally, the matrix B will be the transpose of the entered matrix A.

Please find the

other matrix related programs from the index.

#include<stdio.h>

void main()

{

int A[5][5], B[5][5], i, j, m, n;

clrscr();

printf(“\n\n\t ENTER A ORDER OF THE MATRIX M,N…: “);

scanf(“%d,%d”,&m,&n);

printf(“\n\n\t ENTER THE ELEMENTS OF THE MATRIX..:\n\n”);

for(i=1;i<=m;i++)

{

for(j=1;j<=n;j++)

{

gotoxy(20+j*4,12+i*2);

scanf(“%d”,&A[i][j]);

}

printf(“\n”);

}

for(i=1;i<=m;i++)

for(j=1;j<=n;j++)

B[j][i] = A[i][j];

printf(“\n\t THE TRANSPOSE OF A MATRIX IS…:\n\n\t\t “);

for(i=1;i<=n;i++)

{

for(j=1;j<=m;j++)

printf(” %d”,B[i][j]);

printf(“\n\n\t\t “);

}

getch();

}

Download exe and source code here.

І'd like to find out more? I'd like to find out more details....

The company also offers fun dog videos and stories about dogs, and an up-to-date...

I think the admin of this site is genuinely working hard in support of his web s...

Ranjith thank you for the JNI concept. but i need more help, as my project is on...

Thanks for sharing your thoughts on bangalore jobs. Regards...