0

fibonacci series using function

8th Dec 2017, 3:51 AM
Animesh Kumar
Animesh Kumar - avatar
2 Answers
0
I have written a code that calculate and shows fibonacci series until the n elementh (parameter) in java... but to avoid errors of me trying to translate that to c++ i recommend you to see this link: https://www.programiz.com/cpp-programming/examples/fibonacci-series If it helps you, great! and remember you can do this in two ways: recursive: more clearer, less efficient for n >~ 40 (i tried that and not remember the exactly number.. anyway it could be too much detail level) iteration: opposite pro and cons of recursive. I hope that help you, if not comment :). Excuse my english bye :)
8th Dec 2017, 6:19 AM
Mauro Bastasini
Mauro Bastasini - avatar
0
I modified my code to use a function. I hope this code work for you https://code.sololearn.com/c7aZKJaKdw5P/?ref=app
8th Dec 2017, 6:59 AM
Dany Abreu
Dany Abreu - avatar