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