summaryrefslogtreecommitdiff
path: root/fahr-celc.c
blob: ac3c2fc8f8b84b32d7c1dac03a90d58763bbee67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>

/* print farenheight-celcius 
conversion table for 0, 20, ...300 */
int main() {
  for (float fahr=300.0;
       fahr>=0.0;
       fahr-=20.0) {
    printf("%3.0f %6.1f\n",
      fahr,
      (5.0/9.0)*(fahr-32.0));
  }
}