! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996. Copying for sale requires permission from the author.
! Otherwise, distribution is permitted if these three lines are included.

  module C13M
    implicit none
    public :: Input, Calculate, Output
  contains
    subroutine Input( FT1 )
      real, intent (out) :: FT1
  ! start subroutine Input
      write (unit = *, fmt = *) " Please enter the Fahrenheit temperature. "
      read (unit = *, fmt = *) FT1
      return
    end subroutine Input
    subroutine Calculate (FT2, CT2)
      real, intent (in) :: FT2
      real, intent (out) :: CT2
    real, parameter :: T_SCALE = 1.8, OFFSET = 32.0
  ! start subroutine Calculate
      CT2 = (FT2 - OFFSET) / T_SCALE
      return
    end subroutine Calculate
    subroutine Output( FT3, CT3 )
      real, intent (in) :: FT3, CT3
  ! start subroutine Output
      write (unit = *, fmt = *) FT3, " deg. F = ", CT3, " deg. C"
      return
    end subroutine Output
  end module C13M
