剑指offer---求1+2+3.....+n

class Solution {
public:
    int Add(int num1, int num2)
    {
        while (num2--)
        {
            num1++;
        }
        return num1;
    }
};
原文地址:https://www.cnblogs.com/159269lzm/p/7288469.html