#include <bits/stdc++.h> #include <iomanip> using namespace std; int f(int x){//定义 if(x==0){//边界值 return 1;//条件 }else{ return (x-1)*x; } } int main() { int x; cin>>x; cout<<f(x); return 0; }
递归程序,错哪里了???