19 lines
439 B
C

#include <stdio.h>
#define LOWER 0 /* lower limit of table */
#define UPPER 300 /* upper limit of table */
#define STEP 20 /* increment size */
int main()
{
float fahr, celsius, tModifier;
fahr = LOWER;
tModifier = (5.0/9.0);
while (fahr <= UPPER) {
celsius = tModifier * (fahr - 32.0);
printf("%3.0f°F\t%5.1f°C\n", fahr, celsius);
fahr = fahr + STEP;
}
}