Blob


1 /* 1-14. Rewrite the temperature conversion program of Section 1.2 to use
2 * a function for converstion.
3 */
5 #include <stdio.h>
7 main()
8 {
9 for (int fahr = 0; fahr <= 300; fahr = fahr + 20)
10 printf("%3d %6.1f\n", fahr, f2c(fahr));
11 }
13 float f2c(float fahr)
14 {
15 return (5.0/9.0)*(fahr-32);
16 }