Advertisement
Guest User

Untitled

a guest
May 9th, 2015
673
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     double x = 7;
  8.     bool result = x == 6.9999999999999999;
  9.     cout << "x == 6.9999999999999999 : " << (result ? "true" : "false") << endl;
  10.     return 0;
  11. }
  12.  
  13. // result:
  14. // x == 6.9999999999999999 : true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement