1. C Program to find the factorial of given number.

#include<stdio.h>

#include<conio.h>

int main()

{

    int i,f=1,n;

    printf("Enter the factorial number.");

    scanf("%d",&n);

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

    {

        f=f*i;

    }

    printf("The factorial of %d is %d",n,f);

    return 0;

}



Comments