fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main ()
  6. {
  7. cout << setprecision(4) << 123. << '\n';
  8. cout << setprecision(4) << fixed << 123. << '\n';
  9. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
123
123.0000