Write a program to find the factorial of given Number

#include
#include
void main()
{
    int n,i,temp=1;
    printf("Enter the Number = ");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        temp=temp*i;
    }
    printf("Factorial is : %d",temp);
getch();
}

--------------------------------------------------------------------------------
OUTPUT :

Previous Post
Next Post

Related Posts: