fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a = 15;
  7. int b = 20;
  8. int c = 0;
  9.  
  10. while (b > 0) {
  11. c = a & b;
  12. a = a ^ b;
  13. b = c << 1;
  14. }
  15.  
  16. cout << a << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
35