/* * temperature_conversion.c * * K&R Exercise 1.4 * Print Celsius-Fahrenheit table * for celsius = -100, -90, ... 0, 10, ... 100. * */ #include #define LOWER -100 #define UPPER 100 #define STEP 10 int main() { // Add your code here int celsius; float fahr; celsius = LOWER; while (celsius <= UPPER) { fahr = 9/5.0 * celsius + 32; printf("Celsius: %d \t Fahrenheit: %6.2f\n", celsius, fahr); celsius = celsius + STEP; } return 0; }