Guest User

Untitled

a guest
Feb 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int sumRecurse(int n)
  4. {
  5. if (n == 1)
  6. {
  7. return 1;
  8. }
  9. return sumRecurse(n - 1) + n;
  10. }
  11.  
  12. int main(void)
  13. {
  14. printf("%d\n", sumRecurse(10));
  15. }
Add Comment
Please, Sign In to add comment