标签:
1 class Solution { 2 public: 3 int Add(int num1, int num2) 4 { 5 int sum ; 6 do 7 { 8 sum = num1 ^ num2; 9 num2 = (num1 & num2) << 1; 10 num1 = sum; 11 } 12 while(num2!=0); 13 return sum; 14 } 15 };
标签:
原文地址:http://www.cnblogs.com/xiaoyesoso/p/5161758.html