Computer Science, asked by ckishoreramana1355, 11 months ago

Write a C Program To Find Transpose Of A Matrix

Answers

Answered by rupeshkumar48
2

please make me brain list

Attachments:
Answered by unknownRU
1

Transpose of elements in matrix in c programming

#include<stdio.h>

#include<conio.h>

void main(){

clrscr();

int mat[2][2],trans[2][2],i,j;

printf("Enter elements of matrix\n");

for(i=0;i<2;i++){

for(j=0;j<2;j++){

scanf("%d",&mat[i][j]);}}

printf("Matrix elements: \n");

for(i=0;i<2;i++){

for(j=0;j<2;j++){

printf("%d ",mat[i][j]);}

printf("\n");}

for(i=0;i<2;i++){

for(j=0;j<2;j++){

trans[j][i]=mat[i][j];}}

printf("Transpose elements:\n");

for(i=0;i<2;i++){

for(j=0;j<2;j++){

printf("%d ",trans[i][j]);}

printf("\n");

}

getchar();

}

Similar questions