954,224 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Reducing floating point numbers.

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

printf("%2f",variable);


Is there anything like this in cout?

Elfshadow
Light Poster
27 posts since Jan 2007
Reputation Points: 10
Solved Threads: 0
 
vishesh
Nearly a Posting Virtuoso
1,381 posts since Oct 2006
Reputation Points: 85
Solved Threads: 42
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You