fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x = 0.0; //0.1
  7. for(int i=1;i<=11;i++)
  8. x += 0.1;
  9. double y = 11*0.1;
  10. if(x==y)
  11. cout << "Yes";
  12. else
  13. cout << "No";
  14. cout << setprecision(15) << fixed<< endl << x << endl << y;
  15. return 0;
  16. }
Success #stdin #stdout 0s 4300KB
stdin
Standard input is empty
stdout
No
1.100000000000000
1.100000000000000