Added example 5-14. Sorts data from stdin. Has some issues.
[C-Programming-Examples.git] / ex_1-3.c
blob45659b35bc06ae4daa73b2653a79fcb75c809900
1 #include <stdio.h>
3 main()
5 float fahr, celsius;
6 int lower, upper, step;
8 lower = 0;
9 upper = 300;
10 step = 20;
12 fahr = lower;
14 printf("Temp Coversion Table\n");
15 printf("Fah -> Cent\n");
17 while (fahr <= upper){
18 celsius = (5.0/9.0) * (fahr-32.0);
19 printf("%3.0f %6.1f\n", fahr, celsius);
20 fahr = fahr + step;