PPT Slide
! Example P.3.
! Temperature Converter.
program A03
implicit none
real, parameter :: T_SCALE = 1.8, OFFSET = 32.0 ! named constants
real :: Fahr, Cels ! type declaration
! start program A03
read (unit = *, fmt = *) Fahr ! input
Cels = (Fahr - OFFSET) / T_SCALE ! assignment
write (unit = *, fmt = *) Fahr, Cels ! output
stop
end program A03
Previous slide
Next slide
Back to first slide
View graphic version