#include /* * print a table for Fahrenheit to Celsius * from 0 F to 300 F */ void main(void) { int fahr; /* fahrenheit temperature */ int celsius ; /* celsius temperature */ register int lower = 0; /* begin table here */ register int upper = 300; /* end table here */ register int step = 20; /* increment */ /* * print out the lines for the table */ fahr = lower; while(fahr <= upper){ /* get corresponding temp in degrees C */ celsius = 5 * (fahr - 32) / 9; /* print it */ printf("%d\t%d\n", fahr, celsius); fahr += step; } /* * say goodbye */ exit(0); }