19 lines
313 B
C
19 lines
313 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
double fahr, celcius;
|
|
double lower, upper, step;
|
|
|
|
lower = 0;
|
|
upper = 300;
|
|
step = 20;
|
|
|
|
fahr = lower;
|
|
printf("%6c %8c\n", 'F', 'C');
|
|
while (fahr <= upper) {
|
|
celcius = 5.0/9 * (fahr - 32);
|
|
printf("%6.2f %8.2f\n", fahr, celcius);
|
|
fahr = fahr + step;
|
|
}
|
|
}
|