fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. cout.setf(ios::fixed);
  7. cout.precision(5);
  8. cout<<306.01967999999999<<endl;
  9. cout<<74678.026340835265<<endl;
  10. cout.precision(4);
  11. cout<<306.01967999999999<<endl;
  12. cout<<74678.026340835265<<endl;
  13. cout.precision(3);
  14. cout<<306.01967999999999<<endl;
  15. cout<<74678.026340835265<<endl;
  16. cout.precision(2);
  17. cout<<306.01967999999999<<endl;
  18. cout<<74678.026340835265<<endl;
  19. cout.precision(1);
  20. cout<<306.01967999999999<<endl;
  21. cout<<74678.026340835265<<endl;
  22. cout.precision(0);
  23. cout<<306.01967999999999<<endl;
  24. cout<<74678.026340835265<<endl;
  25. return 0;
  26. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
306.01968
74678.02634
306.0197
74678.0263
306.020
74678.026
306.02
74678.03
306.0
74678.0
306
74678