fork(3) download
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. int main() {
  5. double value = 4.0;
  6. std::cout << "value in default format is " << std::setprecision(10) << value << std::endl;
  7. std::cout << "value in fixed format is " << std::fixed << std::setprecision(10) << value << std::endl;
  8.  
  9. return 0;
  10. }
Success #stdin #stdout 0s 16048KB
stdin
Standard input is empty
stdout
value in default format is 4
value in fixed format is 4.0000000000