8/13/2009

output scientific numbers in c++

put scientific before Energy
and put fixed before Xmax

so the first one (Energy) will output with scientific notation and
the second one (Xmax) will come back to normal notation.


skipws      // skip whitespace on input
left
// pad after the value
right
// pad before the value
internal
// pad between sign and value
boolalpha
// use the symbolic representation of true and false
dec
// integer base
hex
// hexadecimal base
oct
// octal base
scientific
// floating point notation d.ddddEdd
fixed
// d.dd
showbase
// show the base prefix such as 0 or 0x
showpoint
// print trailing zeros
showpos
// show + for positive values
uppercase
// E, X instead of e, x
adjustfield
// flags related to field adjustment
basefield
// flags related to integer base
floatfield
// flags related to floating-point output
unitbuf
// flush output after every operation

没有评论: