      SUBROUTINE script4 (OAP,M,N,MD,ND)
      IMPLICIT real(kind=16) (A-H,O-Z)
      DIMENSION OAP(MD,ND)
      nnn=10
      NN=N/nnn
      IF(NN.EQ.0) GOTO 85
      DO 83 KK=1,NN
      N1=nnn*(KK-1)+1
      N2=nnn*KK
      IF(N2.LT.N1) RETURN
      print*,' '
      WRITE(6,1024) (I,I=N1,N2)
      print*,' '
      DO 83 JJ=1,M
83    WRITE(6,1025) JJ,(OAP(JJ,II),II=N1,N2)
      print*,' '
85    N1=nnn*NN+1
      N2=N
      IF(N2.LT.N1) RETURN
      print*,' '
      WRITE(6,1024) (I,I=N1,N2)
      print*,' '
      DO 84 JJ=1,M
84    WRITE(6,1025) JJ,(OAP(JJ,II),II=N1,N2)
      print*,' '
1024  FORMAT(1X,10(3X,I5))
1025  FORMAT(I5,10F8.4)
      RETURN
      END
