Program to find the factorial of a given number

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
    long n, i, f = 1;
    clrscr();
    printf("Enter a number : ");
    scanf("%ld", &n);
    for(i = 1 ; i <= n ; i++)
    f = f * i;
    printf("\nFactorial value of %ld is : %ld", n, f);
    getch();
}

Output:

Enter a number : 5
Factorial value of 5 is : 120