Assuming you understand how to write a recursive function, you need to establish what the base case is for this problem - when a parameter for the current term passed in is equal to the upper limit (10 in this case, but best also passed as a parameter for flexibility of use). Rather than the usual decreasing value passed in (the 10-1 version), your current term will be 1 in the first call, 2 in the next, and so on.
Val
Reputation Points: 1268
Solved Threads: 228
Posting Virtuoso
Offline 1,895 posts
since Aug 2007