class Solution { public: int add(int num1, int num2){ while (num2) { int s = num1 ^ num2; int c = num1 & num2; num1 = s; num2 = c << 1; } return num1; } };