#include <iostream>
using namespace std;
int fibonacci(int n) {
if(n == 0 || n == 1) {
return n; // 0, 1
}
return fibonacci(n-1)+fibonacci(n-2);
}
int main() {
cout << fibonacci(3) << endl;
return 0;
}
OUTPUT:
2
Yes. I found an available transcript of the video and summarized it simply. The video is “How To Become Red Coder? (codeforces.com)” by Err...
No comments:
Post a Comment