subroutine maxmin_vec(n,a,xmin,xmax) c c* Finds minimum and maximum number of input vector c integer n real a(n),xmin,xmax xmax=a(1) do i=2,n if(a(i).gt.xmax) then xmax=a(i) endif enddo xmin=a(1) do i=2,n if(a(i).lt.xmin) then xmin=a(i) endif enddo return end