summaryrefslogtreecommitdiffstats
path: root/1
diff options
context:
space:
mode:
Diffstat (limited to '1')
-rw-r--r--1/5.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/1/5.c b/1/5.c
new file mode 100644
index 0000000..fcaeb8e
--- /dev/null
+++ b/1/5.c
@@ -0,0 +1,12 @@
+#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;
+} \ No newline at end of file