- #1
NDiggity
- 54
- 0
Homework Statement
A customer brings purchases worth less than $20 to the till, and hands over a $20 bill. Write pseudocode for an algorithm to figure out what change the customer should receive -- i.e., how many $10 bills, how many $5 bills, how many toonies ($2), loonies ($1), quarters (0.25), dimes (0.10), nickels (0.05), and pennies (0.01). Begin by listing the variables you will need. Keep in mind that a proper solution will use as few coins as possible!
The Attempt at a Solution
I don't know how to start this. I named some variables, ie numberOfTens, numberOfFives, change, totalOfPurchases etc but I don't even know where to start. I just want a helping hand so I can get started. Thanks so much!