Tag Archives: C Program Sum of One to N by Recursion

C Program Sum of One to N by Recursion

C Program Sum of One to N by Recursion /*C Program To Add all natural numbers 1 to N Using Recursion */ #include <stdio.h> /* Function prototype */ int sumNumbers(int n); /* main function */ int main() { int num; printf(“Enter a positive integer\nto add all numbers upto: “); scanf(“%d”, &num); printf(“Sum of Numbers Upto… Read More »

Loading