0
What is wrong with this recursion code
https://sololearn.com/compiler-playground/c5j7EaEB6hz9/?ref=app
2 ответов
+ 2
your function doesn't have return type.
in line 20, you misspelled gour function name.
what is the function supposed to do and how is it related to fibonacci numbers?
+ 2
There are three syntax errors to fix:
1) The function declaration is missing its type. It should be:
int int_fibonacci (int i)
^^^
2) Line 13 has a spurious semi-colon in the middle that prevents it from calculating properly. The compiler treats it as two separate statements instead of an addition expression.
3) In main, the function call does not match the actual function name.
After these fixes it works very well, so the logic is good!