shaadi.com

Searching...
Thursday, 24 April 2014

Transpose




void main()
{

int m[2][3],r,c;
clrscr();
for(r=0; r<2; r++)
{
for(c=0; c<3; c++)
{
printf("enter the [%d][%d] no",r+1,c+1);
scanf("%d",&m[r][c]);
}
}
printf("***********************************************");
printf("\n orignal matrix\n");
for(r=0; r<2; r++)
{
for(c=0;c<3;c++)
{
printf("%d\t",m[r][c]);
}
printf("\n");
}
printf("--------------------------------------------------");
printf("\n transpose Matrix\n");

for(r=0; r<3; r++)
{
for(c=0; c<2; c++)
{
printf("%d\t",m[c][r]);
}
printf("\n");

}
printf("press any key to continue");
getch();
}




Next
This is the most recent post.
Older Post

0 comments:

Post a Comment