I, as a beginner tried to compile a program which calculates the Geometric Progression as per the given parameters.
Now the deal is I got it far too complex in order to work out rational forms. So anybody can help me to frame a simpler function to process even rational forms under this equation
Term = First Term * Common Ratio^nth Term-1
or an= a*rn-1
Please reply to this thread if you want my code first...
"n" is a natural number which is "Number of terms" and "nth term" in this example.
"a" is the first term which is any real number. It may be an integer, decimal or in rational (p/q) form, or more commonly, fractional form, and so the "r".
The deal is my function is quite - a lot complex. That's why I need something simpler so that it can be easier to learn and remember.
And I am sorry as I really don't know what you meant by recursive or iteratively.