Monday, August 15, 2011

What am I doing wrong in my Java application?

the terminating condition in your while loop is when amount > 0. In the loop the amount will continue to be greater then 0 because you are multiplying it by 100. The terminating condition is never acheived. You will have to ask the use once again for the amount in the loop or convert the loop to a do while loop.

No comments:

Post a Comment