      PROGRAM TESTMULD

      IMPLICIT NONE
      INTEGER I, J
      INTEGER DIM
      PARAMETER (DIM = 8)
      INTEGER A(DIM, DIM)
      
      DO 10 I = 1, DIM
        DO 20 J = 1, DIM
          A(I, J) = (I/J) * (J/I)
20      CONTINUE
10    CONTINUE          

      CALL PRINTM(A, DIM)
      STOP
      END
      
      SUBROUTINE PRINTM(MATRIX, DIM)
      INTEGER DIM
      INTEGER MATRIX(DIM, DIM)
      
      INTEGER I, J
      
      DO 10 I = 1, DIM
        PRINT *, (MATRIX(I, J), J = 1, DIM)
10    CONTINUE        
      
      RETURN
      END
          
       