#include #define LOWER 0 /* begin table here */ #define UPPER 300 /* end table here */ #define STEP 20 /* increment */ /* * print a table for Fahrenheit to Celsius * from 0 F to 300 F * floating point version */ void main(void) { float fahr; /* fahrenheit temperature */ /* * print out the lines for the table */ for(fahr = LOWER; fahr <= UPPER; fahr += STEP) printf("%3.0f\t%6.1f\n", fahr, (5.0/9.0) * (fahr - 32)); /* * say goodbye */ exit(0); }