#include <stdio.h> float fh(int n) { if(n==1) return 1; else return 1/(n-1+1/fh(n-1)); } main() { float aa=0; int a,b; for(a=1;fh(a)>=0.001;a++) //printf("%f\n",fh(3)); aa=aa+fh(a); printf("%f",aa); getchar(); }
标签:aa,return,递归函数,int,float,C语言,fh From: https://www.cnblogs.com/xkdn/p/17059850.html