Blob
1 #include <stdio.h>3 /* print Fahrenheit-Celsius table4 for fahr = 0, 20, ..., 300; floating-point version */6 main()7 {8 float fahr, celsius;9 int lower, upper, step;11 lower = 0; /* lower limit of temperature table */12 upper = 300; /* upper limit */13 step = 20; /* step size */15 fahr = lower;16 while (fahr <= upper) {17 celsius = (5.0/9.0) * (fahr - 32.0);18 printf("%3.0f %6.1f\n", fahr, celsius);19 fahr = fahr + step;20 }21 }