fork download
  1. #include <iostream>
  2. #include <iomanip> // Dla manipulatorów wywoływanych z argumentem
  3.  
  4. int main()
  5. {
  6. double foo = 5.7595;
  7.  
  8. std::cout<<foo<<"\n"
  9. <<std::fixed<<foo<<"\n"
  10. <<std::setprecision(3)<<foo<<"\n";
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 2724KB
stdin
Standard input is empty
stdout
5.7595
5.759500
5.760