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
Print 1234 as 12.34
Print 1234 as 12.34
Oct 7, 2009 at 2:35am UTC
lampshade
(41)
in C++, what would i use to print "1234" (an integervalue) as "12.34" , reletively painlessly.
Last edited on
Oct 7, 2009 at 2:35am UTC
Oct 7, 2009 at 2:55am UTC
helios
(17607)
float(x)/100.0f
For more accuracy: <<(x/100)<<'.'<<(x%100)
Last edited on
Oct 7, 2009 at 2:58am UTC
Oct 7, 2009 at 2:56am UTC
lampshade
(41)
tytytytyyty
Topic archived. No new replies allowed.