set precision double c++ code example
Example 1: ‘setprecision’ was not declared in this scope
//You have to include header file
#include <iomanip>
Example 2: set precision with fixed c++
int x = 109887;
cout << fixed << setprecision(3) << x;
//You have to include header file
#include <iomanip>
int x = 109887;
cout << fixed << setprecision(3) << x;