#include <stdio.h>
#include <conio.h>
void main()
{
int a[4][4],i,j,r,c;
clrscr();
for(i=0;i<=3;i++)
for(j=0;j<=3;j++)
scanf("%d",&a[i][j]);
printf("\n Original Matrix \n\n");
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
printf("%d ",a[i][j]);
printf("\n");
}
printf("\nTranspose of matrix\n");
for(i=0;i<4;i++)
{
for(j=0;j<4;j++)
printf("%d ",a[j][i]);
printf("\n");
}
getch();
}
Subscribe to:
Post Comments (Atom)
Related Post
Array:
String functions:
General (Loops-for/while)
Thanks sir for providing c programming examples
ReplyDelete