#include <stdio.h>

/* print Fahrenheit-Celsius table
   for fahr = 0, 20, ..., 300 */
main() 
{
      int fahr, celsius;
      int lower, upper, step;

      lower = 0;      /* lower limit of temperature scale */
      upper = 300;    /* upper limit */
      step = 20;      /* step size */

      fahr = lower;
      while (fahr <= upper) {
            celsius = 5 * (fahr-32) / 9;
            printf("%d\t%d\n", fahr, celsius);
            fahr = fahr + step;
      }
}

/*
Discuss:

- comments
- declarations (types)
- variables
- arithmetic expressions
- loops
- formatted output

- types:
    basic data types (int, float, char, short, long, double)
    arrays
    structs
    unions
    pointers to above
    functions that return above

- indentation, braces

- see 04_tempconv.c, 05_tempconv.c

Exercises (page 13): 1.4

*/
