C Program To Find Factorial of a Number using Recursion
ฝัง
- เผยแพร่เมื่อ 12 ก.ย. 2024
- technotip.com/...
Lets write a C program to find Factorial of a user input number using Recursion.
Factorial Definition: Factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n.
Important Note: By convention, Factorial of 0 is 1. i.e., 0! = 1.
Example: 5! = 5 x 4 x 3 x 2 x 1 which is equal to 120. i.e., 5! = 120.
Formula To Calculate Factorial of any positive integer number
We can calculate factorial of any number using this relationship:
num! = num * (num - 1)!
where num is a positive integer number.
C Programming Interview / Viva Q&A List
technotip.com/...
C Programming: Beginner To Advance To Expert
technotip.com/...
thank you, your way of teaching is so easy to understand.
Thank you for the feedback bro. Will do my best. Kindly stay subscribed to our TH-cam channel and blog. And please share our videos with your friends. 🙏
I realy like your method thank you
Thank you ..
Bro your video about recursion is just amazing !!!
Sir it was so easy when you explained tqsm sir
Absolutely great explanation
Tq sir.I clarified my douts.useful video sir
Fantastic explanation thank you
I had made this problem. But i had doubt y not reutrn 0. Thanks to u now i know.😀
Glad to know that it helped :)
Stay subscribed to our TH-cam Channel and blog Technotip.com
Also please let your friends know about our site Technotip.com We would love to serve as many people as possible.
Thank you ..
Void main bhi le sakte the kya?
Yes you can. But it's always good practice to have int main() and then return 0 at the end. Returning 0 indicates(to the operating system) that the code inside main executed with out any error.
thank you sir my problem solve
This was really helpful, I did spent a lot of time trying to understand the logic before watching this video, thanks techotip
thank you
Cool.
Waste didn't get the output
I just copy the same coding and tried in my laptop i didn't get the right output
In output if i enter any number
For eg : i entered 7
So output coming as return 0 is 1
thanks
it would be better if you could explain it in hindi too.
not understood a single word
can you speak in english?