#include /* print Fahrenheit-Celsius table for fahr = 0, 20, ..., 300 */ main() { int celsius, fahr; int lower, upper, step; lower = 0; /* lower limit of temperature table */ upper = 300; /* upper limit */ step = 20; /* step size */ printf("Celsius-Fahrenheit table\n"); celsius = lower; while (celsius <= upper) { fahr = ( 9 * celsius / 5) + 32 ; printf("%d\t%d\n", celsius, fahr); celsius = celsius + step; } } /* celsius = 5 * (fahr-32) / 9 */