summaryrefslogtreecommitdiffstats
path: root/1/5.c
blob: 7ca87d365c6fe43f61a1d6a371ef2c8c554ebb9d (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdio.h>

/* prints a conversion table from fahrenheit to celsius in reverse order */
int main(int argc, char *argv[]) {
  int fahr;

  for (fahr = 300; fahr >= 0; fahr = fahr - 20)
    printf("%3d %6.1f\n", fahr, (5.0 / 9.0) * (fahr - 32));

  return 0;
}