[Dev-C++] Simple formatted output question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Scott W. <se...@al...> - 2002-11-07 02:31:20
|
Hi, This is a "C" question (not C++). When printing a number in exponential format (%e) using printf or one of its friends, three digits are used for the exponent: 1.2345e+006. I would like to change this behavior so that the exponent only uses as many digits as it needs: 1.2345e+6 I've looked, but this feature does not appear to be built into any of the format modifiers/switches. Am I missing something and/or is there an easy way to do this? Thnx, Scott |