How to find factorial of any number?

CODE




How to find factorial of any number?
int main()
{
    int i,a,fact=1;
    printf("\n enter the number=");
    scanf("%d",&a);
    for(i=1;i<=a;i++)
        fact*=i;
    printf("\n factorial=%d",fact);
}


Output:
enter the number=
 4

 factorial=24

How to find factorial of any number? How to find factorial of any number? Reviewed by Unknown on December 15, 2018 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.