哪里错了???编译都不过!!!
查看原帖
哪里错了???编译都不过!!!
790685
bluetored楼主2022/10/10 15:21
#include <iostream>
#include <cstdio>
using namespace std;
int x = 1;
int factorial(int s)
{
	x *= s;
	s--;
	factorial(s);
	if (s == 1)
		return x;
}
int main()
{
	int n;
	cin >> n;
	printf("%d", factorial(n));
	return 0;
}
2022/10/10 15:21
加载中...