format - How to output exponent value -
using scientific format in output file, get: 0.245e+02 instead of 2.45e+01.
how output in later format in fortran?
x = 2.45 write(*,130) 'x=', x 130 format (a,e8.2) update: according @bálint aradi's answer, should have set x = 24.5 in order 2.45e+01. 
you should use "scientific exponential" (es) format:
x = 2.45 write(*, "(a,es8.2)") "x=", x 
Comments
Post a Comment