# Thread: A Coin Word Problem

1. ## A Coin Word Problem

A puzzle problem involving coinage

A shopkeeper and her customer each have an unlimited number of coins.
However, they are of only two denominations – 3˘ and 5˘.

1. What amount purchases are not possible using only these two denominations of
coinage, if the shopkeeper is allowed to give change back to the customer?

2. If the shopkeeper has no coins at all to give as change, but the customer has an
unlimited number of these two coins, what purchase amounts are possible?

2. ## Re: A Coin Word Problem

Hey testtrail429.

As a hint to start off, consider ten combinations that correspond to have 0,1,2,3,4,5,6,7,8, and 9 in the lowest digit (for example \$1.98 would have an 8 in this category) so basically this is given when you have N cents in total and to get this attribute you calculate N % 10 where % is the modulus function.

Now consider that to get back the change you need to have a combination of these coins to be the change: so if the change is C then C - 3*x - 5*y = 0 for positive numbers (including zero) to get back your change, otherwise if this is not possible then you can't get the change back.