- 博客(1)
- 收藏
- 关注
原创 为了完成作业,应付一下(真的,别看)
1158:求1+2+3+...(简单易懂) 不喜欢废话,代码先上 #include<iostream> #include<cstdio> using namespace std; int d(int n) { if(n==1) { return 1; } else { return d(n-1)+n; } } int main() { int x; cin>>x; cout<<d(x); return 0; } ..
2021-12-10 23:11:45
287
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅