Commit 7d0d1de

mo khan <mo@mokhan.ca>
2014-02-10 00:50:39
complete exercise 1-3.
1 parent 5546862
Changed files (2)
src/1-3/fahrenheit_celsius.c
@@ -0,0 +1,19 @@
+#include "stdio.h"
+
+int main()
+{
+  float fahr, celsius;
+  int lower, upper, step;
+
+  lower = 0;
+  upper = 300;
+  step = 20;
+
+  printf("Fahrenheit Celsius\n");
+  fahr = lower;
+  while (fahr <= upper) {
+    celsius = (5.0/9.0) * (fahr-32.0);
+    printf("%10.0f %7.1f\n", fahr, celsius);
+    fahr = fahr + step;
+  }
+}
.gitignore
@@ -0,0 +1,1 @@
+*.out