(12C) Lowest Unit Cost - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: General Software Library (/forum-13.html) +--- Thread: (12C) Lowest Unit Cost (/thread-11821.html) |
(12C) Lowest Unit Cost - Gamo - 11-19-2018 06:30 AM 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:
Gamo |