subroutine fortranswap(n,x1,x2) implicit none integer n,i double precision x1(n),x2(n),term do i=1,n term=x1(i) x1(i)=x2(i) x2(i)=term enddo return end