Added example with variable arrays.
[C-Programming-Examples.git] / temp_conv.c
blobc2249ae41b63044bbe9d29bfdf0b83cc75e11b3d
1 #include <stdio.h>
3 main()
5 int fahr, celsius;
6 int lower, upper, step;
8 lower = 0;
9 upper = 300;
10 step = 20;
12 fahr = lower;
13 while (fahr <= upper){
14 celsius = 5 * (fahr-32) / 9;
15 printf("%d\t%d\n", fahr, celsius);
16 fahr = fahr + step;