A Platform to LEARN | CODE | ACHIEVE
ENTER THE NUMBER :10
THE FACTORIAL OF 10 IS : 3628800
What we did - Our Approach
In this problem we have to generate the factorial of a number.
Let us consider an example :
Suppose we have to find the factorial of 6,hence this means that we have to calculate 1*2*3*4*5*6. It is clear that we can find the factorial of any number 'n',by multiplying each number from i:1 to 'n',such that fact=fact*i .This can be achieved by using for loop from 1 to 'n'. Note : It is mandatory for you to initialize the result variable(here fact) with 1 as in an equation ' fact=fact*i ' , if fact=0 then overall result will be 0 as well.
For any Queries,suggestions,feel free to Mail us at :
For reporting any kind of copyright voilation,mail us at : firstname.lastname@example.org
© copyright CODE OF GEEKS