#P1713. 自定义函数.求阶乘1.填空题

自定义函数.求阶乘1.填空题

题目描述

输入一个正整数 n,输出 n 的阶乘。

输入格式

一个正整数 n(0 <= n <= 20)

输出格式

一个整数,为n的阶乘

样例

4
24

程序填空

#include<bits/stdc++.h>
using namespace std;
填空(1) fac(填空(2) )
{
	long long ans=1;
	for(int i=2;i<=n;i++)
		ans*= 填空(3) ;
	return 填空(4) ;
}
int main()
{

	int n;
	cin>>n;
	cout<<填空(5) ;
	
	return 0;
}

填空(1) :{{ input(1) }}

填空(2) :{{ input(2) }}

填空(3) :{{ input(3) }}

填空(4) :{{ input(4) }}

填空(5) :{{ input(5) }}