Factorial

May 23, 2011 at 5:57am
Calculate factorial of a number using main() only in Recursion??
Last edited on May 23, 2011 at 7:20am
May 23, 2011 at 6:48am
closed account (D80DSL3A)
Yes. It can be done.
May 23, 2011 at 6:52am
but hw dude?
May 23, 2011 at 7:05am
closed account (D80DSL3A)
There's a search box at the top of the page. Try "factorial function". The problem has been solved here countless times.
You'll hit the mother load.
May 23, 2011 at 7:05am
Try using a loop.
May 23, 2011 at 7:20am
buddy, i want that program using recursion.. i was unable to solve that problem.. so i need ur help guys.. sorry i forgot to mention recursion in my first post....
May 23, 2011 at 7:57am
closed account (D80DSL3A)
I tried the search I suggested and quickly found your last thread on the same subject.
http://www.cplusplus.com/forum/beginner/40696/
Was it not solved well enough in this previous thread of yours?
You checked it as solved.
What question remains?
EDIT: That's right, you want it to run in main() only. You can't call main() recursively.
Last edited on May 23, 2011 at 7:59am
Topic archived. No new replies allowed.