#include <stdio.h>
long long int func(int n)
{
int i;
long long int result = n;
for(i = 1; i <= n-1; i++)
{
result = result *(n - i);
}
return result;
}
int main()
{
int n;
printf("plaese enter a number:\n");
scanf("%d",&n);
printf("n!=%lld\n",func(n));
return 0;
}
long long int func(int n)
{
int i;
long long int result = n;
for(i = 1; i <= n-1; i++)
{
result = result *(n - i);
}
return result;
}
int main()
{
int n;
printf("plaese enter a number:\n");
scanf("%d",&n);
printf("n!=%lld\n",func(n));
return 0;
}