diff options
| author | cgd <cgd@NetBSD.org> | 1993-04-10 15:51:24 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1993-04-10 15:51:24 +0000 |
| commit | 439d2fb46cfec58a16c4a9856cc00ea4a2ee6de3 (patch) | |
| tree | dd34836a974bf8d23a53a2773f34394576710d12 /gnu/usr.bin/bc/Examples/ckbook.b | |
| parent | a3960efdef82d52889d981e42c8e404f99470203 (diff) | |
gnu bc. necessary to compile the distribution
Diffstat (limited to 'gnu/usr.bin/bc/Examples/ckbook.b')
| -rw-r--r-- | gnu/usr.bin/bc/Examples/ckbook.b | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gnu/usr.bin/bc/Examples/ckbook.b b/gnu/usr.bin/bc/Examples/ckbook.b new file mode 100644 index 00000000000..5815ea02075 --- /dev/null +++ b/gnu/usr.bin/bc/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 |
