Dollar change routine

I

InAFog

I'm looking for an example of what a routine, either an If, Do or Dowhile
etc., to make change for a dollar would look like.
Thank you
 
J

John Spencer

Amount = AmountIn -Int(AmountIn)
(If the input is in dollars and cents - 1.59 then get rid of the whole
dollars)


Quarters (0 to 3)
Amouint \ 25

Dimes (0 to 2)
(Amount Mod 25) \ 10

Nickels (0 to 1)
Amount - ((Amount\25)*25) - (((Amount Mod 25) \10) * 10)

Pennies (0 to 4)
Amount Mod 5
 
Top