Making Change for a Purchase

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

Suppose you work in an old-fashioned country general store without a newfangled computerized cash register. You have to work out the change for a purchase in your head. The "Change" display turns red when you select the right amount.


Here's how to do it. Suppose the purchases total $5.33 and the customer hands you a $10 bill. Imagine adding 2¢ to the $5.33 to get $5.35; then add 5¢ to bring the total to $5.40; 10¢ to get to $5.50; 50¢ (or 2 quarters) to get to $6.00; and finally add four $1 bills. This adds up to a total change of $4.67.


Contributed by: S. M. Blinder (March 2011)
Open content licensed under CC BY-NC-SA



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.