	PROGRAM main
	 IMPLICIT NONE

	 REAL A(2,3)
	 REAL B(3,2)
	 REAL C(2,2)
	 REAL D(3,3)
	 INTEGER i, j

	 DATA A / 1, 2, 3, 4, 5, 6 /
	 DATA B / 1, 2, 3, 4, 5, 6 /

	 print *, "Matrix A"
	 DO i = 1, 2
	    print *, " ", A(i,:)
	 END DO

	 print *
	 print *, "Matrix B"
	 DO i = 1, 3
	    print *, " ", B(i,:)
	 END DO

	 C = MATMUL(A, B)
	 print *
	 print *, "Matrix C = A*B"
	 DO i = 1, 2
	    print *, " ", C(i,:)
	 END DO

	 D = MATMUL(B, A)
	 print *
	 print *, "Matrix D = B*A"
	 DO i = 1, 3
	    print *, " ", D(i,:)
	 END DO

	END
