Untitled
unknown
c_cpp
2 years ago
285 B
16
Indexable
// to calculate the number of times the function is called #include <bits/stdc++.h> using namespace std; int fibonacci(int n) { if (n <= 1) return 1; return fibonacci(n - 1) + fibonacci(n - 2) + 1; } int main() { cout << fibonacci(100) << endl; return 0; }
Editor is loading...