Post Reply 
(15C) Cash Register
04-04-2018, 10:36 PM (This post was last modified: 04-04-2018 10:51 PM by Michael Zinn.)
Post: #1
(15C) Cash Register
This is an implementation of a cash register. What's special about it is that it is optimized for convenient quick usage.

Setup
1. Put the current amount of cash in register 0
2. Put the price list in the other registers.
3. Run A (Abort) to make sure that the register is in initial state.

Example register price list:
1 Fries $1.00
2 Extra Ketchup $0.20
3 Coke $0.80
4 Ice Cream $2.50

Usage
1. First, input what the customer wants to buy. E.g. if they say "2 Fries and 1 Coke" you enter 1 E E 3 E. Notice that you press the E button as many times as the preceeding item is to be sold.
2. Press D when Done. It will now show how much to charge the customer. Tell it to the customer.
3. Enter how much the customer is giving you and then hit C to calculate Change. E.g. if the customer is handing you $10 you'll enter 10 C. The calculator will now show you how much change to give with a negative sign (if it shows a positive sign it means that the customer didn't give you enough money).
4. If all is well hit B like Bye to commit the transaction or hit A like Abort to cancel everything.

At the end of the day, you should check if you actually have as much money as there is in register 0.

Program
Notice that this uses program fall through so you'll have to enter B right before A or it won't work

Code:

LBL E
STO I
RCL (i)
STO + .8
R \/
RTN

LBL D
RCL .8
RTN

LBL C
-
RTN

LBL B
RCL .8
STO + 0
LBL A
0
STO .8
RTN
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(15C) Cash Register - Michael Zinn - 04-04-2018 10:36 PM
RE: (15C) Cash Register - Dieter - 04-05-2018, 07:31 AM
RE: (15C) Cash Register - Michael Zinn - 04-05-2018, 03:35 PM
RE: (15C) Cash Register - Dieter - 04-05-2018, 08:26 PM



User(s) browsing this thread: 1 Guest(s)