#include /* print Celsius-Fahrenheit table For celsius = -100, -80, ..., 200; floating point version */ /* I thought that it would probably be more useful to people if they had some negative degrees Celsius on their list, so I shifted the lower-upper bounds down by 100. */ #define LOWER -100 #define UPPER 200 #define STEP 20 int main () { float fahr, celsius; celsius = LOWER; printf ("Celsius-Fahrenheit Conversion Table\n"); while (celsius <= UPPER) { fahr = ((9.0/5.0) * celsius) + 32.0; printf ("%3.0f %6.1f\n", celsius, fahr); celsius = celsius + STEP; } // while (celsius <= UPPER) return 0; } // main