#include<stdio.h> // Claculate factorial function
long factorial(int x)
{
if ( x == 1 )
return 1;
else return
x*factorial(x-1);
}
int main()
{
int n;
int c = 1;
printf(" input number : ");
c = scanf("%d",&n);
while( c == 1 )
{
printf(" %d! = %ld\n",n,factorial(n));
printf(" input number : ");
c = scanf("%d",&n);
}
}