Posted in All Posts, Semester 2

Program to print sum of numbers from 1 to n using recursion

Earlier, we learned what are recursive functions. Now we are going to see a program based upon the concept of recursion.
In this post, we will see a C program that works using a recursive function. The program takes an integer n as input from the user and print the sum of numbers from 1 to n using a recursive function recursum().

You may download the program below.
Download

We hope that you found this article to be helpful.
Please share your thoughts in the Comments Section.

If you liked this article, then please like our Facebook page.

Suggested Reading

Comment your thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.