#include<stdio.h>

main()
{
     int x, f;
     printf("Enter a number \t");
     scanf("%d", &x);
     f=1;
     while(x>1)
     {
        f = f * x;
        --x;                 
     }
     printf("factorial = %d", f);  
     system("pause");
}
