You can also check factorial of a program using for loop

You can also check factorial of a program using Recursion

Flowchart to Find Factorial of a Number

PROGRAM:

#include<stdio.h>
#include<conio.h>
void main()
{
    int n,i,f;
    f=i=1;
    clrscr();
    printf("Enter a Number to Find Factorial: ");
    scanf("%d",&n);
    while(i<=n)
    {
        f*=i;
        i++;
    }
    printf("The Factorial of %d is : %d",n,f);
    getch();
}

 OUTPUT:

Enter a Number to Find Factorial: 5
The Factorial of 5 is : 120