A Program That Read A Positive Integer & Display Its Factorial.

#include<stdio.h>
#include<conio.h>

void main()
{
    int i,n;
    long fact=1;
    clrscr();
    printf("Enter any number = ");
    scanf("%d",&n);
   
    for(i=1;i<=n;i++)
       fact=fact*i;

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

    getch();
}

///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........