cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How To?
How To?
Sep 6, 2008 at 4:36pm UTC
walaskey
(7)
Hey if you keep getting alphanumeric data as outputs instead of numerical data then what could the issue be?
here is an example of:
$1.2e+003 instead of $1,167.15?
Sep 6, 2008 at 5:06pm UTC
HeatMan
(65)
Post the code and we'll see what is the problem.
Sep 6, 2008 at 5:31pm UTC
jsmith
(5804)
By default floating point numbers are output in scientific notation, which is what you are seeing. You need to set the precision and # of decimal places.
If using iostreams, look up setprecision().
Topic archived. No new replies allowed.