- 2
How to find factorial of any number?
With the help of while loop. Or In maths.
4 odpowiedzi
+ 2
You know how to find factorial in mathematics then u can easily solve in programing
Suppose we have a number 5 and u need to find factorial then factorial is not but the multiplication of given number in reverse order till 1
Number is 5
Factorial will be 5*4*3*2*1=120
Same for 6
Factorial will be 6*5*4*3*2*1
How u can find in programing if u know basics of loop and data types then u can see easily find . If u dont know then take help of YouTube u will get better explanation.
Take one variable factorial and initlize it with 1 use for loop and start your loop from n number to decreasing order and multiply loop values with factorial. Hope u got it
+ 1
Deepika Please google your queries before posting here.
- 2
Simba I'm not understand