Login Register






Factorial Series filter_list
Author
Message
RE: Factorial Series #4
Are you talking about this?
Spoiler:
Code:
int fact(int n) { if(n==0 || n==1) return 1; else return n*fact(n-1); } int sum(int n) { if(n==1) return fact(1); else return fact(n)+sum(n-1); }


Or you want it in just one function?

Reply





Messages In This Thread
Factorial Series - by brainfreeezed1 - 11-19-2012, 05:03 AM