Change Return Program

The user enters a cost and then the amount of money given. You should write a program that works out what denominations of change should be given in pounds, 50p, 20p, 10p etc.
Extensions:
1. The program will figure out the change for the American currency and the number of quarters, dimes, nickels, pennies needed for the change
2. Make an automatic testing part of your program where it automatically generates a random price and an amount that you give the cashier. It then works out what change to give,
and then tests that your program works by adding the change back onto the price of the item to prove your program works. It should flag an error if there are problems.

Scroll to Top