Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (18 sloc) 323 Bytes
#include <stdio.h>
float to_celsius(float fahr) {
return 5.0 / 9.0 * (fahr - 32.0);
}
main()
{
float fahr;
int step, lower, upper;
lower = 0;
upper = 300;
step = 20;
fahr = lower;
while(fahr <= upper) {
printf("%3.0f\t%.2f\n", fahr, to_celsius(fahr));
fahr += step;
}
return 0;
}
Jump to Line
Something went wrong with that request. Please try again.