What is the output of program, cout.setprecision() - C++ File Stream

C++ examples for File Stream:cout

Description

What is the output of program, cout.setprecision()

Demo Code

#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, const char *argv[]) {
    cout << setw( 8 ) << setprecision( 3 ) << 1024.987654; 

    return 0;/*from   www . ja v a  2 s. c o m*/
}

Result


Related Tutorials