printf("%g\n", .000010);

Michael D Mellinger melling at cs.psu.edu
Wed May 29 11:53:23 AEST 1991


Is there a way to print numbers less than 10^-4 in decimal notation
without trailing zeros?  For example, I want printf("%g\n", .000010)
to be printed as .00001.  %g uses the %e format if numbers are less
than 10^-4.

-Mike



More information about the Comp.lang.c mailing list