#include <stdio.
h>
int main()
{
int a[10][10], rc, i, j, flag = 0;
printf("Enter number of rows or columns of the square matrix: ");
scanf("%d", &rc);
// Storing elements of the matrix
printf("\nEnter elements of matrix:\n");
for(i=0; i<=rc-1; i++)
for(j=0; j<=rc-1; j++)
{
printf("Enter element a%d%d: ",i+1, j+1);
scanf("%d", &a[i][j]);
}
// Displaying the matrix a[][] */
printf("\nEntered Matrix: \n");
for(i=0; i<=rc-1; i++)
for(j=0; j<=rc-1; j++)
{
printf("%d ", a[i][j]);
if (j == rc-1)
printf("\n\n");
}
// checking with the transpose of matrix a
for(i=0; i<=rc-1; i++)
for(j=0; j<=rc-1; j++)
{
if(a[j][i] != a[i][j])
flag = 1;
}
if (flag == 0)
printf ("The matrix is Symmetric.\n");
else
printf("The matrix is Not Symmetric.\n");
}