#include
#include
void main()
{
int a[10][10],count=0,i,j,m,n;
clrscr();
printf("\nEnter the rows and columns of matrix :");
scanf("%d %d",&m,&n);
if(m!=n)
{
count++;
printf("the given matrix is not symmetric matrix since rows and columns are not equal\n");
}
else
{
printf("\n enter the matrix a:");
for(i=0;i
for(i=0;i
if(a[i][j]!=a[j][i])
{
count++;
break;
}
}
if(count==0)
printf("\nThe given matrix is symmetric matrix");
else
printf("\nThe given matrix is not symmetric matrix");
}
getch();
}
No comments:
Post a Comment