Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

SUBROUTINE ABSOL(Z, W)

IMPLICIT NONE

! Declare input array

INTEGER, DIMENSION(5,4), INTENT(IN) :: Z

! Declare output array

INTEGER, DIMENSION(5,4), INTENT(OUT) :: W

! Declare loop variables

INTEGER :: I, J

! Compute absolute value of each element in Z and store in W

DO I = 1, 5

DO J = 1, 4

W(I,J) = ABS(Z(I,J))

END DO

END DO

END SUBROUTINE ABSOL

You might also like