I need help with the following:

How do we calculate the sum of consecutive numbers from 1 to n and not from n to 1 by using recursion.

Eg. if n = 10

it should be 1+2+...+9+10 and not 10+9+...+2+1.

This topic has been dead for over six months. Start a new discussion instead.

Recommended Topics