well obviously you can and actually its even better than recursion in this case unless you use hashing.But,factorial using recursion is one of the best ways to understand how recursion works so that you can understand when to use recursion to solve problems faster or in a simpler/shorter way than iterating.Infact,pretty much every problem that can be solved using recursion can also be solved using iteration but recursion can make your life much simpler if you understand it.
Before teaching another, you learn first. What a bad tutorial I have found so far!
but in this case the factorial of zero won't give 1
num of factorial argument n num which is declared in main function can't be same Na?
there is a fault in this program you must add add
int factorial (int num);
before main( )
not required
Yes bro
Declaration is required
What about zero in if condition what Id n=0?
return 1 dumbo
he is confused about his code and also this code dont give 1 of factorial of 0
don't recommend this video.............................
thanks for program
Thank u sir!
it helped thank u
super
nice
very bad explanation
best
it's really complex . u could do it in an easy way also which is looping using( for loop) ...
whats the point of using recursion then
well obviously you can and actually its even better than recursion in this case unless you use hashing.But,factorial using recursion is one of the best ways to understand how recursion works so that you can understand when to use recursion to solve problems faster or in a simpler/shorter way than iterating.Infact,pretty much every problem that can be solved using recursion can also be solved using iteration but recursion can make your life much simpler if you understand it.
@@TheGamerGuy201 Thanks you for this wonderful explanation
worst