Post Reply 
(12C) Lowest Unit Cost
11-19-2018, 06:30 AM
Post: #1
(12C) Lowest Unit Cost
Program for budget minded shoppers that repeatedly choose the least
costly (lowest unit cost) of equivalent items.

Procedure:

First Item follow by Second Item

(1st) Price [ENTER] Quantity [ENTER]
(2nd) Price [ENTER] Quantity [R/S] --> Answer

If First Item is cheaper display answer shown 1
If Second Item is cheaper display answer show 2
If both are equal display answer show 3

Example:

Item #1
13 ounces at $1.63
Item #2
17 ounces at $2.15

1.63 [ENTER] 13 [ENTER] 2.15 [ENTER] 17 [R/S] display 1

Answer: Item #1 is cheaper than Item #2

Program:
Code:

01  ÷
02 STO 1
03 Rv
04  ÷
05 STO 2
06 X<>Y
07 Rv
08  -
09 X=0
10 GTO 19
11 RCL 2
12 RCL 1
13 X≤Y 
14 GTO 17
15  1
16 GTO 00
17  2
18 GTO 00
19  3
20 GTO 00

Gamo
Find all posts by this user
Quote this message in a reply
Post Reply 




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