"Fossies" - the Fresh Open Source Software Archive

Member "bc-1.06.95/Examples/ckbook.b" (7 Jul 2000, 330 Bytes) of package /linux/misc/old/bc-1.06.95.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Limbo source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    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