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.

louis vuitton handbags outlet for Cheap Hello would you mind letting me know w...

Everyone loves what you guys are up too. This sort of clever work and coverage! ...

Greetings! This is my first visit to your blog! We are a collection of volunte...

sir can u please send me the ckt dig n the details of this project...

Good post but I was wanting to know if you could write a litte more on this topi...