summaryrefslogtreecommitdiff
path: root/wk1/calculator.c
diff options
context:
space:
mode:
Diffstat (limited to 'wk1/calculator.c')
-rw-r--r--wk1/calculator.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wk1/calculator.c b/wk1/calculator.c
new file mode 100644
index 0000000..037436d
--- /dev/null
+++ b/wk1/calculator.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <cs50.h>
+
+int main(void)
+{
+ long x = get_int("x: ");
+ long y = get_int("y: ");
+
+ double z = (double) x / (double) y;
+ printf("%.20f\n", z);
+}