I am generating a text file to be used as a FORTRAN input file. The FORTRAN program specifies that the values it reads must be in a format such that
1.0
must be printed as
0.1000000E+01
As of right now the closest I have gotten in using iostream is
1.000000E+00
with the code
cout << setprecision(6) << fixed << scientific << uppercase;
_set_output_format(_TWO_DIGIT_EXPONENT);
cout << 1.0 << endl;
Does anyone know the best way to get a leading zero as shown above, preferably using ostream instead of printf?