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 0.01s 5276KB
stdin
5
12
stdout
 Enter the temperature in degrees Fahrenheit:
 degrees Fahrenheit=   258.149994     kelvins