ccplusplus.com
Learn C, C++ Concepts
Friday, February 3, 2012
scientific notation examples c++
/************************************************************************* * File : scientific-notation.cpp * Author : Saurabh Gupta * Desc : scientific notation examples c++ * Source : http://www.ccplusplus.com/p/c_15.html * Created : 11:17 PM Friday, February 03, 2012 *************************************************************************/ #include <iostream> using namespace std; int main() { double dValue = 1000000.0; cout << dValue << endl; dValue = 0.00001; cout << dValue << endl; return 0; } /* * OUTPUT * [sgupta@rhel6x86 scientific-notation]$ c++ scientific-notation.cpp -o scientific-notation [sgupta@rhel6x86 scientific-notation]$ ./scientific-notation 1e+06 1e-05 [sgupta@rhel6x86 scientific-notation]$ */
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment