Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rounding Problem

    im not sure if this is the correct forum but here goes
    i am using netbeans ide 5.0 bluej edition

    i am using money and i typed in this
    System.out.println(money.format(cost/100));

    one of the values of cost was 1.165 which it should have made 1.17 correct?
    but instead it rounded it down the 1.16

    also a different value of cost was 1.475 and it made the 1.48

    does aynone know what might be wrong with this?

  • #2
    Senior Coder
    Join Date
    Jul 2005
    Location
    New York, NY
    Posts
    1,084
    Thanks
    4
    Thanked 19 Times in 19 Posts
    System.out.println would be Java, not JavaScript. Head to "Server Side Languages"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •