commit 3a078b646fe47d5eaecd54e722bc93af68057007 Author: test123 Date: Wed Nov 6 06:57:27 2024 +0000 Add fibo.cpp diff --git a/fibo.cpp b/fibo.cpp new file mode 100644 index 0000000..2a6598c --- /dev/null +++ b/fibo.cpp @@ -0,0 +1,10 @@ +#include + +int fibo(int n) { + if (n <= 1) return n; + return fibo(n - 1) + fibo(n - 2); +} + +int main() { + cout << fibo(5) << endl; +} \ No newline at end of file