Example 45: Sum of the First n Natural Numbers
Write a recursive function to obtain the running sum of the first n natural numbers.
Try it yourself
Try to solve this question on your own in the code widget below. If you get stuck, you can always refer to the solution provided.