Q12 Write a recursive function to obtain the running sum of first 25 natural numbers.

Program: 133

Write a recursive function in c language to obtain the running sum of first 25 natural numbers.

(1) Without using recursion
(2) Using recursion

How to use recursion to get the sum of first 25 natural numbers.

Output:

Enter Range: 10

Non-Recursive: Sum of first 10 numbers is: 55
Recursive: Sum of first 10 numbers is: 55

Lokesh Kumar

Being EASTER SCIENCE's founder, Lokesh Kumar wants to share his knowledge and ideas. His motive is "We assist you to choose the best", He believes in different thinking.

Leave a Reply

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