diffrence in non recusion and recursion

Hi,

If  i  have given to write a prog for  factorial   in C  using  recursion  and without

recursion which one is better in what condition and why ?

thanks

The recursion one is really easy to code but will take a little long to produce result (and limited by the size of your stack memory ?) than without a recursion ... at list on a P150mhz :smiley:

The usual idiom is that if the algorithm potentially requires many levels of recursion (say 100), then avoid recursion.