Website Summary Files Commits Branches @commit @diff @stats
path: root / Sem. 14 / task1.cpp
diff options
context:
space:
mode:
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