cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
cut off zeroes from double datatype
cut off zeroes from double datatype
Nov 30, 2014 at 8:42pm UTC
MrBond90
(52)
hey I just wanted to know a way to cut off any remaining zeroes from a double data type. I' trying to calculate cost and output it but it keeps adding a bunch of zeroes on the end. I know there must be a way to
Nov 30, 2014 at 8:45pm UTC
wildblue
(1505)
Check out setprecision() in <iomanip>
http://www.cplusplus.com/reference/iomanip/setprecision/
Topic archived. No new replies allowed.