Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fibonacci
//g++ 7.4.0 #include <iostream> using namespace std; int fibo(int n){ if(n==0) { return 0; } if(n==1) { return 1; } int fib1= fibo(n-1); int fib2 = fibo(n-2); return fib1+fib2; } int main() { cout<<fibo(3); }
run
|
edit
|
history
|
help
0
constructing object on first use as return value of (pointer to) object-returning function
Good morning
c2p_update
EqualIdentical
numberOftweets
horse aand goat working
Let's Go!
Prime Factor
Sort row sorted matrix
Roger Cheng