/* Write a recursive function to obtain the sum of first 25 natural numbers.
*/
/* Let Us C, Chap- 10 (Recursive), Qn No.: B(b) */
/* This file is auto-generated by a bot. */
/* This code is not compiled; it is for reference only. */


#include <stdio.h>
#include <math.h>
#include <stdlib.h>

int get_sum(int);

int main()
{
    int n = 25, sum;

    sum = get_sum(n);
    printf("Sum of first %d natural numbers is: %d\n", n, sum);

    return 0;
}

int get_sum(int n)
{
    if (n == 0)
        return 0;
    else
        return n + get_sum(n - 1);
}
