
Common Function Examples 61
Example 3.3 Returning Exact Change
In this example, we are going to use the FLOOR function to determine how many one
dollar bills, quarters, dimes, nickels, and pennies are needed to return exact change to
a customer. We assume that we always want to use the minimum number of bills and
coins of different denominations to make up the exact change. For example, we want
to use two one dollar bills, one quarter, and two pennies to return $2.27 to a customer
rather than nine quarters and two pennies.
You may recall that the FLOOR function rounds a number down to the nearest integer
or to the nearest integer multiple of ...