20
33
3458
论坛元老
#include<bits/stdc++.h> using namespace std; double x; double f(int n) { if(n==1) { return x/(x+1); } return x/(n+f(n-1)); } int main() { cin>>x; int a; a=f(5); cout<<printf("%0.2f",a)<<endl; return 0; }
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|DiscuzX
GMT+8, 2025-2-13 02:30 , Processed in 0.051288 second(s), 27 queries .
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.. 技术支持 by 巅峰设计