! 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 C14M
    implicit none
    public :: Input, Calculate, Output
    real, private :: Fahr, Cels
  contains
    subroutine Input( )
  ! start subroutine Input
      write (unit = *, fmt = *) " Please enter the Fahrenheit temperature. "
      read (unit = *, fmt = *) Fahr
      return
    end subroutine Input
    subroutine Calculate( )
    real, parameter :: T_SCALE = 1.8, OFFSET = 32.0
  ! start subroutine Calculate
      Cels = (Fahr - OFFSET) / T_SCALE
      return
    end subroutine Calculate
    subroutine Output( )
  ! start subroutine Output
      write (unit = *, fmt = *) Fahr, " deg. F = ", Cels, " deg. C"
      return
    end subroutine Output
  end module C14M
