PROGRAM matris
IMPLICIT NONE
INTEGER::b,i,j,k,n,t
INTEGER,ALLOCATABLE::a(:,:)
PRINT*,"baraye matris n*n lotfan n ra vared konid : "
READ*,n
ALLOCATE (a(n,n))
DO t=1,n
PRINT*,"khate",t,"ra vared konid : "
READ*,a(t,:)
END DO
PRINT*
DO i=1,n-1
DO j=i+1,n
b=a(i,j)
a(i,j)=a(j,i)
a(j,i)=b
END DO
END DO
DO k=1,n
PRINT*,a(k,:)
END DO
PRINT*
END