Saturday, February 4, 2012

setprecision function in c++

setprecision function in c++:

Before we move in lets first understand about the precision in c++.


we can override the default precision that cout shows by using the setprecision() function that is defined in a header file called iomanip. See the example below to understand how it works.

Example:

No comments:

Post a Comment