15
16
24万
论坛元老
使用道具 举报
660
846
243万
管理员
#include<bits/stdc++.h> using namespace std; double f(int x,int n) { if(n==1) return sqrt(1+x);//函数名字是sqrt else { return sqrt(n+f(x,n-1));//f(x,n-1) } } int main() { int x,n;//使用前要声明 cin>>x>>n; printf("%.2f",f(x,n));//少个括号 }
admin 发表于 2024-3-9 21:16 [mw_shl_code=cpp,true]#include using namespace std;
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|DiscuzX
GMT+8, 2025-5-29 23:08 , Processed in 0.073990 second(s), 34 queries .
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.. 技术支持 by 巅峰设计