summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/1-5.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/1-5.c b/src/1-5.c
new file mode 100644
index 0000000..37ea8c8
--- /dev/null
+++ b/src/1-5.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+/* print fahrenheit to celsius conversion in reverse order
+ * */
+int main(int argc, const 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;
+}