home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / bc-1.02-src.lha / src / amiga / bc-1.02 / Examples / ckbook.b next >
Text File  |  1991-12-16  |  330b  |  17 lines

  1. scale=2
  2. print "\nCheck book program!\n"
  3. print "  Remember, deposits are negative transactions.\n"
  4. print "  Exit by a 0 transaction.\n\n"
  5.  
  6. print "Initial balance? "; bal = read()
  7. bal /= 1
  8. print "\n"
  9. while (1) {
  10.   "current balance = "; bal
  11.   "transaction? "; trans = read()
  12.   if (trans == 0) break;
  13.   bal -= trans
  14.   bal /= 1
  15. }
  16. quit
  17.