std cout floating point precision 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;