Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (12 sloc) 279 Bytes
// Section 1.4 Example 1 from page 15
#include <stdio.h>
#define LOWER 0
#define UPPER 300
#define STEP 20
// Print Fahrenheit-Celsius table
main() {
int fahr;
for (fahr = LOWER; fahr <= UPPER; fahr = fahr + STEP) {
printf("%3d %6.1f\n", fahr, (5.0/9.0)*(fahr-32));
}
}