Report as inappropriate.
This is an expansion of my AP Computer Science summer project.
It calculates change.
I ended up having to round a lot of the doubles... which was my mistake in the first place. I probably should have used ints for all money values and then just divided once at the end. Either way, I think its accurate...
Click "TENDERED" and enter the amount of money you're "paying". (can enter cents too) Backspace to clear.
Click "ITEM PRICE" and enter the price of the item you're "paying for". (can enter cents too) Backspace to clear.
Click the "CHANGE:" block to calculate the best change combination of $.01, $.05, $.10, $.25, $1, $5, $10, $20, $50 and $100.
All programming by me, except for the BitFont class, which is made by Ninto.
Want to leave a comment? You must first log in.