how to round-off decimals?

This is a discussion on how to round-off decimals? within the C# Programming forums, part of the General Programming Boards category; how can i make 2.74890 to 2.75??? pls helppppp!!!!...

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    34

    how to round-off decimals?

    how can i make 2.74890 to 2.75???


    pls helppppp!!!!

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Is this "presenting" (i.e. displaying to user) or for "continuing to calculate with the modified number"?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680
    Use the Math.Round method

  4. #4
    Registered User
    Join Date
    Dec 2006
    Posts
    34
    tnx./...


    for continuing to calculate w/ the modifiied number....

    and how bout making 2.74568 to 2.74 , meaning i wil not round it off. il just drop '568'

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. About aes
    By gumit in forum C Programming
    Replies: 13
    Last Post: 10-24-2006, 04:42 PM
  2. I need some quick help with code.
    By stehigs321 in forum C Programming
    Replies: 35
    Last Post: 10-30-2003, 10:07 PM
  3. Someone help me with this game??
    By stehigs321 in forum Game Programming
    Replies: 15
    Last Post: 10-30-2003, 09:42 PM
  4. Please help with some coding..
    By stehigs321 in forum C Programming
    Replies: 2
    Last Post: 10-27-2003, 06:44 PM
  5. How do I round decimals
    By fastlane29 in forum C++ Programming
    Replies: 5
    Last Post: 03-19-2002, 08:44 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21