Loop programming

  1. Temperature conversion

    Write a program using a loop which gives a Celsius to Fahrenheit conversion table in units steps from 0oC to100oC. (To get degrees oF, multiply oC by 9/5, then add 32; to check your result, note that water freezes at 32oF and boils at 212oF.)

    When you have finished or have difficulties compare it to theprogram tabletemp.f

  2. Range of real variables stored by FORTRAN programs

    Write a simple program to find approximately the largest value that can be stored in a real variable. (You might, for example, repeatedly multiply a variable the power of 2 within a loop, printing the new value on the terminal, until the computer gives up).

  3. Range of integer variables stored by FORTRAN programs

    Rewrite the above simple program to find approximately the largest value that can be stored in an integer variables.


Now return to the Introduction to FORTRAN Programming