The file Ref.c contains a copy of
a program to convert Fahrenheit to
Celsius that prints from 0 to 300
Modify it to print from 300 down to 0
in steps of 50. Type ready when you're done.
/* print Fahrenheit-Celsius table
for f = 0, 20, ..., 300 */
lower = 0; /* lower limit of temperature table */
upper = 300; /* upper limit */
step = 20; /* step size */
celsius = (5.0/9.0) * (fahr-32.0);
printf("%4.0f %6.1f\n", fahr, celsius);
main() /* Fahrenheit-Celsius 300 ... 0 by 50 */
lower = 0; /* lower limit of temperature table */
upper = 300; /* upper limit */
step = 50; /* step size */
for (fahr = upper; fahr >= lower; fahr = fahr - step)
printf("%4.0f %6.1f\n", fahr, (5.0/9.0) * (fahr-32.0));