c-playground/temp-input.c

16 lines
277 B
C
Raw Permalink Normal View History

2024-05-21 20:48:40 +07:00
#include <stdio.h>
#define LOWER 0
#define STEP 20
#define END 200
int main() {
float fahr, celsius;
printf("Fahrenheit\tCelsius\n");
for(fahr = LOWER; fahr <= END; fahr += STEP) {
celsius = (5.0/9.0) * (fahr - 32.0);
printf("%3.1f\t\t%3.1f\n", fahr, celsius);
}
}