I would use a loop for each denomination of coin. I would subtract the value of each coin from the remainder each time through each loop and I would increment the number of each coin appropriately each time through a loop. I don't see how division or modulus will give the number of each coin otherwise.