Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program ConvertKelvin
- implicit none
- ! -----------------------------------------------Declare
- real tempC, tempK, ZERO_SHIFT
- parameter (ZERO_SHIFT = 273.15)
- ! -----------------------------------------------Input
- print*, "Enter the temperature in Celsius ..."
- read*, tempC
- ! -----------------------------------------------Compute
- tempK = (tempC + ZERO_SHIFT)
- ! -----------------------------------------------Output
- print*, "The corresponding Kelvin temperature is "
- print*, tempK, " degrees"
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement