Please note an important distinction between the values you use to calculate with internally (denominated in cents) and what you display to the user (denominated in dollars). You will probably want to write some routines hat translate between your internal representation and what you take for input and display for output.
This, btw, is quite common to do.
My criteria for good software:
Does it work?
Can someone else come in, make a change, and be reasonably certain no bugs were introduced?