Here is one solution
Correct version:
symmetric
true
for row
1 to n do
for column
1 to n do
if a[row,column] != a[column,row] then
symmetric
false
endif
endfor
endfor
because once the array is not symmetric ie symmetric= false it
cannot ever be symmetric even though subsequent comparisons may
indicate that it is!!!!!!
Another correct version is:
symmetric
true
for row
1 to n do
for column
1 to n do
symmetric
(symmetric) and
( a[row,column]=a[column,row])
endfor
endfor
It is not necessarily the only solution.