求帮助
查看原帖
求帮助
1427903
ltllqy楼主2024/8/25 10:40
#include<bits/stdc++.h>
using namespace std;
int n;
int f(int x){
	if(x==n) return 1;
	else return f(x-1)+x;
}
int main(){
	int n;
	cin>>n;
	cout<<f(n);
	return 0;
}
2024/8/25 10:40
加载中...