What an expected result you want to see? And what are you seeing from your program?
One thing to be noted is that you may multiply the "payment" and "total" variable with 100 before you deal with them. Then you can use "int" instead of "double" to do the computation. The reason is that "double" is an estimate value and may be off by a very small value (epsilon) each time you compute (especially division). Oh and "penny" should never need to be computed if you already multiply by 100 because whatever left should be "penny" amount.
Taywin
Posting Virtuoso
1,727 posts since Apr 2010
Reputation Points: 229
Solved Threads: 239