* The Changemaker Program * * This program will assume an amount paid for an item * of an assumed value and will compute the change due and * how to make that change in U.S. currency. * program CMAKER real*4 price, amt_paid, change, coins integer*4 dollars, quarters, dimes, nickels, pennies ******* CALCULATE CHANGE price = 46.33 amt_paid = 50.00 change = amt_paid - price ******* FIGURE BILL AND COIN DISTRIBUTION change = change * 100.0 dollars = change / 100 coins = MOD (change, 100.0) quarters = coins / 25 coins = MOD (coins, 25.0) dimes = coins / 10 coins = MOD (coins, 10.0) nickles = coins / 5 coins = MOD (coins, 5.0) *** CORRECTION FACTOR FOR REAL NUMBER ANOMOLIES coins = coins + 0.1 pennies = coins stop end