fork download
  1. PROGRAM temp_conversion
  2. REAL::temp_f
  3. REAL::temp_k
  4. print *,'Enter the temperature in degrees Fahrenheit:'
  5. read *,temp_f
  6. temp_k=(5./9.)*(temp_f-32.)+273.15
  7. print *,'degrees Fahrenheit=',temp_k,'kelvins'
  8. END PROGRAM temp_conversion
Success #stdin #stdout 0s 5316KB
stdin
5
12
stdout
 Enter the temperature in degrees Fahrenheit:
 degrees Fahrenheit=   258.149994     kelvins