Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
fb_series
#include <iostream> using namespace std; int fib(int n) { if (n<=1) { return n; } return fib(n-1)+fib(n-2); } int main () { int n; cout<<"Enter a number : "<<endl; cin>>n; int sum=fib(n); cout<<"Element at position "<<n<<" is : "<<sum<<endl; system("pause"); }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Policy based smart pointer
Value equal to index value
Second program
Anagrams WIP
riemann
pangram
Problem: binary
Reverse a String
replace_copy_if-30-Seconds-of-C++
Memory_test
Please log in to post a comment.