Calculate the Nth term

  • + 0 comments

    My take

    int find_nth_term(int n, int a, int b, int c) {
        if (n == 1)
        {
            return a;
        }
        return find_nth_term(--n, b, c, (a+b+c));
    }