Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 13 / task2.cpp
diff options
context:
space:
mode:
1 files changed, 14 insertions, 0 deletions
-rw-r--r--Sem. 13/task2.cpp14
diff --git a/Sem. 13/task2.cpp b/Sem. 13/task2.cpp
new file mode 100644
index 0000000..39f69ad
--- /dev/null
+++ b/Sem. 13/task2.cpp
@@ -0,0 +1,14 @@
+#include <iostream>
+using namespace std;
+
+unsigned fibb(unsigned n)
+{
+ if (n == 0 || n == 1)
+ return 1;
+ return fibb(n - 1) + fibb(n - 2);
+}
+
+int main()
+{
+ cout << fibb(5);
+} \ No newline at end of file