Ticker

6/recent/ticker-posts

program to input 2x3 matrix and display in transpose form that is in 3x2 matrix in c programming -source code

 #include<stdio.h>

void main(){

int i ,j,a[2][3];

printf("enter the 2x3 matrix element: \n");

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

for(j=0;j<3;j++)

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

}

printf("the 3x2 matrix elements after transpose are :\n");

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

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

printf("%d\t",a[j][i]);

printf("\n");

}

}





Reactions

Post a Comment

0 Comments