Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Replies
    13
    Views
    2,268

    [SOLVED] Re: how to format double value?

    .49 rounds to 0
    .5 rounds to 1
  2. Replies
    13
    Views
    2,268

    [SOLVED] Re: how to format double value?

    If you want the rounding rules for .4 to round to it 1 then that is your business.
    What value would truncate to 0?
    Just add .5 to it and use normal rounding.
    Normally .4 truncates to 0.
  3. Replies
    13
    Views
    2,268

    [SOLVED] Re: how to format double value?

    What are your rounding rules?
    .304 does not round to .31. Less than .305 should truncate to .3
    You would have to add .005 to get it to round up
  4. Replies
    13
    Views
    2,268

    [SOLVED] Re: how to format double value?

    What is the unformatted value of total?
  5. Replies
    13
    Views
    2,268

    [SOLVED] Re: how to format double value?

    What variable's contents is being printed?
    What is the unformatted value of that variable?

    Your weakly formatted code is hard to read. The code within methods should be indented to make it...
  6. Replies
    13
    Views
    2,268

    [SOLVED] Re: how to format double value?

    Can you copy and paste here your program's output. No images because you can not copy and paste from an image.
    and post what you want the output to look like.
Results 1 to 6 of 6