[Dev-C++] Basic 'float' and Decimal Output
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ken B. <kba...@ya...> - 2007-02-03 17:20:20
|
This is a very fundamental equation...
I put 2 'float's in my program and multiplied them...
I then used basic 'cout' to print out the decimals...
The program internally rounded all 3 outputs to basically integers...
It did not print the number to the right of the decimal...
I thought I could use setprecision() to see number of decimals to right of decimals...
but that did not work...
...so, why does dev4cpp do this...?... and...
how do I make simple corrections for printing of decimals from floats...?
Thks, ken
---------------------------------
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started. |