#include<stdio.h>
#include<conio.h>
int main()
{
int z[8][8],c,r;
for(r=1;r<=3;r++)
{
for(c=1;c<=3;c++)
{
printf(“Enter element at position (%d,%d): “,r,c);
scanf(“%d”,&z[r][c]);
}
}
printf(“Elements enterd by you are:\n”);
for(r=1;r<=3;r++)
{
for(c=1;c<=3;c++)
{
printf(“%d “,z[r][c]);
}
printf(“\t\n”);
}
printf(“Transpose of matrix is:\n”);
for(r=1;r<=3;r++)
{
for(c=1;c<=3;c++)
{
printf(“%d “,z[c][r]);
}
printf(“\t\n”);
}
getch();
}