number display

This is a discussion on number display within the C++ Programming forums, part of the General Programming Boards category; Hi In C++ using the cout statement... How can I display a value only to a specified number of decimal ...

  1. #1
    Registered User
    Join Date
    May 2008
    Posts
    28

    Question number display

    Hi

    In C++ using the cout statement...

    How can I display a value only to a specified number of decimal places?

    Thanks

  2. #2
    The larch
    Join Date
    May 2006
    Posts
    3,573
    These might help (in particular setprecision and may-be also fixed).
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    28
    Thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 10-07-2008, 07:19 PM
  2. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 02:31 AM
  3. Perfect number...
    By Argo_Jeude in forum C++ Programming
    Replies: 8
    Last Post: 07-12-2005, 02:53 PM
  4. Random Number problem in number guessing game...
    By -leech- in forum Windows Programming
    Replies: 8
    Last Post: 01-15-2002, 05:00 PM

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