Search:

Type: Posts; User: iDizzle

Search: Search took 0.10 seconds.

  1. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Great, thanks again! I'll be frequenting this forum more often with java help =]
  2. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    So -= is kind of like x++ or x-- from C? I think I will leave my code as is since it is working now but for future reference how would my code have looked if I had implemented the -=?

    And again,...
  3. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Ok so for the nickel value I changed it to this..

    nickel=(int) (((amt-(ten*10)-(five*5)-(one*1)-(quarter*.25)-(dime*.10))+.05)/.05);

    I added the .05 there. and now it did give me the correct...
  4. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    I do not understand the -= operator. I don't believe we have learned that yet. I feel pretty crappy in that class because everyone is a CS/programming major so most people are very familiar with the...
  5. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    So I was searching online and I found something called "ceiling" or "cover" that might do what I want? Would these algorithms take care of my problem? And if they will, how do I use them?:rolleyes:
  6. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Are there any packages or classes than can be included that will do the rounding?
  7. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    hmmm. Honestly, as you can see, I'm terrible at this. But even I feel like I'm doing this the hard way. If you look at my last code, I feel that I'm relying wayyy too much on math and arithmetic...
  8. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    uh oh... that's probably why. What can I do about this? =/
  9. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Okay. So I worked on it a little more and I think I almost got it. Except the fact that the nickel value is not rounding up. So 35.77 will not give me "1 nickel" from the 2 cents....
  10. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Okay so I figured out how to cast a double to an int. But I'm still having trouble with the arithmetic to subtract from the total. If you look at my code below, all it's going to output is change in...
  11. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Thank you! Okay i will do a check on the arithmetic. If I change the dollar amounts to int values, wouldn't I have problems because the "amt" is a double value? Would I have to use some kind of data...
  12. [SOLVED] Re: Help with my Java program: Making change from an entered double.

    Sorry. No errors, I just don't get the output I need.

    I get this;

    Please enter the amount to be changed
    $35.77

    Ten dollar bills: 32.193000000000005
    Five dollar bills: 28.616000000000003...
  13. [SOLVED] Help with my Java program: Making change from an entered double.

    Hi everyone. I am a beginner of beginners in Java. I'm not a CS or programming major but I am now taking a Java course because it is required. I look forward to hearing your insight.

    I'm working...
Results 1 to 13 of 14