Ask your own question, for FREE!
OpenStudy Ambassadors 16 Online
OpenStudy (christos):

C++, Can anybody help me with this recursive function ? https://www.dropbox.com/s/8j48u3gq1wmqtgq/Screenshot%202015-11-28%2015.29.06.png?dl=0

OpenStudy (christos):

What I came up so far

OpenStudy (christos):

#include <iostream> using namespace std; double n; int display(double n) { if (n == 0) { return 1; } else{ return float(1)/n + float(1)/display(n-1); } } int main() { cout << display(5); }

OpenStudy (christos):

@hartnn r u here?

hartnn (hartnn):

yep :)

OpenStudy (christos):

can you help me :D

OpenStudy (christos):

omg did I post it in the wrong section

hartnn (hartnn):

yes, but thats fine....or you could ask again in Comp Science section and close here.

OpenStudy (christos):

ok will do

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!