SUBROUTINE swap(a,b)
  IMPLICIT NONE
  DOUBLE PRECISION, INTENT (inout) :: a, b

  DOUBLE PRECISION :: c

  c = a
  a = b
  b = c
END SUBROUTINE swap


PROGRAM ask
  IMPLICIT NONE

  DOUBLE PRECISION:: a, b
  
  INTERFACE 
     SUBROUTINE swap(a,b)
       IMPLICIT NONE
       DOUBLE PRECISION, INTENT (inout) :: a, b
     END SUBROUTINE swap
  END INTERFACE

  READ *, a, b

  CALL swap(a,b)

  PRINT *, a, b

END PROGRAM ask
