cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
decimal
decimal
Aug 17, 2008 at 3:31pm UTC
mrprog
(1)
how to turn off decimal point??
Aug 17, 2008 at 4:14pm UTC
Mitsakos
(343)
What do you mean to turn it off?
Round the number, eliminate all the decimal points without rounding or show the number without showing the decimal point ( 12.45 -> 1245 ) ??
Aug 18, 2008 at 2:46am UTC
mikeb570
(188)
You could do something like setprecision() or whatever to say 2 decimal places and then multiply it by 100 say. I'm curious about why this would be any use though.
I dunno
123.4 -> 1,234
12.34 -> 1,234
1.23456 -> 123,456
Topic archived. No new replies allowed.