C
comp_novice
I need to control the number of digits to be printed after the
exponential. Please have a look at the example below:
float fVal = 0.06854344
The printf that I am using is
fprintf(pfile, "%E\n", fVal);
The result is 6.854344E-002
The output that I require should be something like this 6.854344E-02
There is an extra zero in the output that I get. I need to trim that.
How do I accomplish this?
Thanks in advance...
exponential. Please have a look at the example below:
float fVal = 0.06854344
The printf that I am using is
fprintf(pfile, "%E\n", fVal);
The result is 6.854344E-002
The output that I require should be something like this 6.854344E-02
There is an extra zero in the output that I get. I need to trim that.
How do I accomplish this?
Thanks in advance...