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