fork download
  1. #include <iostream>
  2.  
  3. int main()
  4. {
  5. double a = 1.0000001;
  6. double b = a;
  7. bool o = false;
  8. std::cout << a << " " << b << std::endl;
  9.  
  10. for (long long t = 1; t < 1000000000; t++) {
  11. if (o) {
  12. a = a * b;
  13. } else {
  14. a = a / b;
  15. }
  16. o = !o;
  17. }
  18. std::cout << a << std::endl;
  19. return 0;
  20. }
Success #stdin #stdout 6.36s 2852KB
stdin
Standard input is empty
stdout
1   1
1