Calculates the least amount of coins needed for a cashier to give a customer.