Reducing floating point numbers.

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jan 2007
Posts: 27
Reputation: Elfshadow is an unknown quantity at this point 
Solved Threads: 0
Elfshadow's Avatar
Elfshadow Elfshadow is offline Offline
Light Poster

Reducing floating point numbers.

 
0
  #1
Jul 10th, 2007
For a program I'm writing I only need two digits past the decimal.I was a c programmer and the way I would have done this was
  1. printf("%2f",variable);
Is there anything like this in cout?
Last edited by Elfshadow; Jul 10th, 2007 at 6:02 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 1,311
Reputation: vishesh is on a distinguished road 
Solved Threads: 36
vishesh's Avatar
vishesh vishesh is online now Online
Nearly a Posting Virtuoso

Re: Reducing floating point numbers.

 
0
  #2
Jul 10th, 2007
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC