Factorial of a number using common way

 #include<stdio.h>

int main()

{

    int i,fact=1,n;

    printf("enter the number:");

    scanf("%d",&n);

    for(i=1;i<=n;i++)

    {

        

        fact= fact*i;

    }

    printf("%d=%d",n,fact);


}

Comments

Popular posts from this blog

Use of function in mathematics

My resume using HTML and CSS