/*PROGRAM TO CHECK WHETHER A MATRIX IS SYMMETRIC OR NOT */

 

#include<stdio.h>

#include<conio.h>

void main()

{

int a[3][3],i,j;

clrscr();

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

printf(“Enter a[%d][%d]=”,i,j);

scanf(“%d”,&a[i][j]);

}

}

 

for(i=0;i<3;i++)

{

for(j=0;j<3;j++)

{

if(a[i][j]==a[j][i])

continue;

else

{

printf(“\n The matrix is not symmetric “);

}

}

}

printf(“\nThe matrix is symmetric”);

getch();

}

219 total views, 2 views today

Get Free Email Updates..!
Join us for FREE to get instant email updates..! GobsInfo- Everything Unlimited
We hate spam. Your email address will not be sold or shared with anyone else.