【题目描述】
【输入】
【输出】
【输入样例】
【输出样例】
#include<iostream> #include<cmath> using namespace std; double x; int n; double f(double x,int n){//返回型递归,函数须return if(n==1)return sqrt(1+x); return sqrt( n + f(x,n-1) ); } int main() { cin>>x>>n; printf("%.2f",f(x,n)); return 0; }//OK***数据类型要统一
Powered by 孙会中 @ 2024-2026【 www.sunhuizhong.cn 】All rights reserved
访问统计:386183 本月:281 上月:799 今日:1 昨日:7 当前在线:1人