#include<iostream.h>
#include<conio.h>
long int fact(int x); // function prototype
int main()
{
long int m;
int n;
clrscr();
cout<<"ENTER THE NUMBER WHOSE FATORIAL IS NEEDED:"<<endl;
cin>>n;
m = fact(n);
cout<<"THE FACTORIAL OF GIVEN NUMBER IS : "<<m;
getch();
return 0;
}
long int fact(int x)
{
int i;
long int fact;
fact = 1;
for (i=1; i<=x; i++)
{
fact = fact * i;
}
return (fact);
}