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.

My spouse and I absolutely love your blog and find the majority of your post's t...

how will compiled and run...

6% in champaign shoes 2012, at White Rock Lake. This may allow for fluid motion....

Your style is very unique in comparison to other people I've read stuff from. ...

In order to play around with this particular method, you can outsource some link...