Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.08 seconds.

  1. Replies
    6
    Views
    6,588

    Re: Trying to Give Coins For Change

    That's happening because floating point arithmetic is not exact when talking about very small numbers. There are good explanations (try googling "what every computer scientist should know about...
  2. Replies
    6
    Views
    6,588

    Re: Trying to Give Coins For Change

    I'm not sure what your code is supposed to do. What exactly are you supposed to return?

    But I see one major problem: you're setting both purchase and payment to 0 at the top of the method, so of...
  3. Replies
    6
    Views
    6,588

    Re: Trying to Give Coins For Change

    Hint: What happens when you convert a double value into an int?

    Or if you don't like that hint, you can always go the hard way: Math (Java Platform SE 6)

    Edit- Why are the values for the counts...
Results 1 to 3 of 3