PPT Slide
public :: Input, Temp_C, Output
subroutine Input( F_Temp )
real, intent(out) :: F_Temp
write (unit = *, fmt = *) " Please enter the Fahrenheit temperature. "
read (unit = *, fmt = *) F_Temp
function Temp_C( F_Temp ) result( Temp_C_R )
real, intent(in) :: F_Temp
real, parameter :: T_SCALE = 1.8, OFFSET = 32.0
Temp_C_R = (F_Temp - OFFSET) / T_SCALE
subroutine Output( F_Temp, Temp_C_R )
real, intent(in) :: F_Temp, Temp_C_R
! start subroutine Output
write (unit = *, fmt = *) F_Temp, " deg. F = ", Temp_C_R, " deg. C"