outputting floats only up until the thousandths digit

D

Daniel Galron

Greetings.

I'm need to output some floats, but only up until the thousandths digit.
I heard there was some way of doing it with cout. How?

Thanks,
Daniel
 
V

Victor Bazarov

Daniel Galron said:
I'm need to output some floats, but only up until the thousandths digit.
I heard there was some way of doing it with cout. How?

Take a read on '<iomanip>', 'setprecision', 'setw', 'fixed'
(and other manipulators). And google more often.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,417
Latest member
DarrenGaun

Latest Threads

Top