19 lines
433 B
C
19 lines
433 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\t%5.1f\n", fahr, celsius);
|
|
fahr = fahr + STEP;
|
|
}
|
|
}
|