The source code of the above program is:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<conio.h> | |
int main() | |
{ | |
int num[3][3]; | |
int a,b,m,n; | |
printf("enter the order of whose transpose is to be find\n"); | |
scanf("%d%d",&m,&n); | |
for(a=0;a<m;a++) | |
{ | |
for(b=0;b<n;b++) | |
{ | |
printf("enter matrix element %d\n",a+1); | |
scanf("%d",&num[a][b]); | |
} | |
} | |
printf("the matrix form of the entered elements is\n"); | |
for(a=0;a<m;a++) | |
{ | |
for(b=0;b<n;b++) | |
{ | |
printf(" %d",num[a][b]); | |
} | |
printf("\n"); | |
} | |
printf("the transpose of the matrix is\n"); | |
for(a=0;a<m;a++) | |
{ | |
for(b=0;b<n;b++) | |
{ | |
printf(" %d",num[b][a]); | |
} | |
printf("\n"); | |
} | |
} |
0 comments :
Post a Comment