aboutsummaryrefslogtreecommitdiffstats
path: root/calc
diff options
context:
space:
mode:
authorClyne Sullivan <clyne@bitgloo.com>2018-04-02 12:29:05 -0400
committerClyne Sullivan <clyne@bitgloo.com>2018-04-02 12:29:05 -0400
commit31458dd042da2a3ce732546cd94318457b4f5bcf (patch)
tree5e6cf8a524b84bd414f0d2760b9ee8bedc92cdec /calc
parent8a25cb84e7c51749dd6d43d58e4952ef311eed45 (diff)
change load/run style, hunt for memory leaks
Diffstat (limited to 'calc')
-rw-r--r--calc12
1 files changed, 12 insertions, 0 deletions
diff --git a/calc b/calc
new file mode 100644
index 0000000..fd67c28
--- /dev/null
+++ b/calc
@@ -0,0 +1,12 @@
+go = 1
+while (go == 1) {
+ print("> ")
+ input = gets()
+ answer = solve(input)
+ if (answer == 42) {
+ go = 0
+ }
+ print("\n")
+ print(answer)
+ print("\n")
+}