How do i write a recursive method to sum x^n + x^(n-1) + x^(n-2)?

I posted a question yesterday about how to find the sum of a recursive method

The post is located here: Recursive method to sum x^0 + x^1 + x^2 + ... +x^n

How do i make a recursive method in reverse.

Ex: x^n + x^(n-1) + x^(n-2) + ... + 3 + 2, + 1

I am having a lot of trouble wrapping my brain around recursive methods and a lot of other resources aren't helping me out. Any help is appreciated. Thanks Everyone!



Read more here: https://stackoverflow.com/questions/64900091/how-do-i-write-a-recursive-method-to-sum-xn-xn-1-xn-2

Content Attribution

This content was originally published by Dave at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: