#python
def fun(n): if n==0|n==1: return 1 else: n=n*fun(n-1) return n n=int(input('请输入')) print(f'{fun(n)}')
#c语言
#include<stdio.h>
int fun(int n)
{
if (n == 0 || n == 1)
return 1;
else
n = n * fun(n-1);
return n;
}
int main()
{
printf("请输入");
int n;
scanf_s("%d", &n);
printf("%d", fun(n));
}