Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / task1.cpp
diff options
context:
space:
mode:
Commit44adf9d35e7e1b8075514b716e95c0fed6bdbe52 (patch)
Author
 Angeld55 <angel_dimitriev@abv.bg>
2021-01-09 16:19:28 +0200
Committer
 Angeld55 <angel_dimitriev@abv.bg>
2021-01-09 16:19:28 +0200
Filesd27e89c56fe213e82e7c990167224ec10f74c541 /Sem. 14/task1.cpp
Introduction_to_programming_FMI-44adf9d35e7e1b8075514b716e95c0fed6bdbe52.tar
Introduction_to_programming_FMI-44adf9d35e7e1b8075514b716e95c0fed6bdbe52.tar.gz
Introduction_to_programming_FMI-44adf9d35e7e1b8075514b716e95c0fed6bdbe52.zip
Parenta69b56e59ae0e7862c75d0ee014029e56ff5298a (diff)
added sem 14
1 files changed, 16 insertions, 0 deletions
-rw-r--r--Sem. 14/task1.cpp16
diff --git a/Sem. 14/task1.cpp b/Sem. 14/task1.cpp
new file mode 100644
index 0000000..01d4eb9
--- /dev/null
+++ b/Sem. 14/task1.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+using namespace std;
+
+unsigned binom(unsigned n, unsigned k)
+{
+ if (n < k)
+ return 0;
+ if (n == k || k == 0)
+ return 1;
+ return binom(n - 1, k) + binom(n - 1, k - 1);
+}
+
+int main()
+{
+
+} \ No newline at end of file