//You have to include header file #include <iomanip>
int x = 109887; cout << fixed << setprecision(3) << x;