summaryrefslogtreecommitdiff
path: root/Examples/ckbook.b
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/ckbook.b')
-rw-r--r--Examples/ckbook.b16
1 files changed, 16 insertions, 0 deletions
diff --git a/Examples/ckbook.b b/Examples/ckbook.b
new file mode 100644
index 0000000..5815ea0
--- /dev/null
+++ b/Examples/ckbook.b
@@ -0,0 +1,16 @@
+scale=2
+print "\nCheck book program!\n"
+print " Remember, deposits are negative transactions.\n"
+print " Exit by a 0 transaction.\n\n"
+
+print "Initial balance? "; bal = read()
+bal /= 1
+print "\n"
+while (1) {
+ "current balance = "; bal
+ "transaction? "; trans = read()
+ if (trans == 0) break;
+ bal -= trans
+ bal /= 1
+}
+quit