fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. float a = 1e-12;
  8. std::cout << "The number is : " << a + 1.0 << std::endl;
  9.  
  10. std::cout << std::setprecision(13) << "The number is : " << a + 1.0 << std::endl;
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 4524KB
stdin
Standard input is empty
stdout
The number is : 1
The number is : 1.000000000001