2 /* exercise 1-15: Fahrenheit-Celsius table but with a function */
3 /* print Fahrenheit-Celsius table
4 for fahr = 0, 20, ..., 300; floating-point version */
9 float lower
, upper
, step
;
11 lower
= 0; /* lower limit of temperatuire scale */
12 upper
= 300; /* upper limit */
13 step
= 20; /* step size */
17 while (fahr
<= upper
) {
18 celsius
= (5.0/9.0) * (fahr
-32.0);
19 printf("%3.0f %6.1f\n", fahr
, celsius
);