outputting a double to n decimal places
Author |
Message |
DanielG
|
Posted: Thu Dec 25, 2008 2:30 pm Post subject: outputting a double to n decimal places |
|
|
is there any command to do this? or is the only way to write a function specifically for it? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
SJ
|
|
|
|
 |
wtd
|
Posted: Thu Dec 25, 2008 5:43 pm Post subject: RE:outputting a double to n decimal places |
|
|
Using printf is exactly the wrong answer. "printf" is a C function. You're using C++, so you need to be using iostreams and setprecision. |
|
|
|
|
 |
DanielG
|
Posted: Fri Dec 26, 2008 5:01 pm Post subject: RE:outputting a double to n decimal places |
|
|
Thanks |
|
|
|
|
 |
|
|