-
The change machine
The user enters the amount due and the amount tendered. You are to calculate how much change they should receive. You are then to break down the change in $1 bills, quarters, dimes, nickles, and pennies such that the user will receive the least amount of coins. For example $0.80 is 3 quarters and a nickel not 8 dimes or 80 pennies.
-
if no1 help u, tomorow ill help you, but right now its 2am and i want to sleep :) and i already did that program for school (i dont have the source anymore sorry man) and it's fairly easy, all u have to make sure is that your formula work. its a lot of math work and for some reasons the formula always end up ****ed lol ;) that's why i want to wait for tomorow when my mind will be clear
-
You need to begin with the highest denomination and work down to the lowest, something like below.
Amount=2.35
dollars = (Amount mod 1)/1
Amount = Amount mod 1
quarters = (Amount mod .25)
Amount = Amount mod .25
...
..