summaryrefslogtreecommitdiff
path: root/6p4.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-09-04 19:56:28 +0200
committerOskar <[email protected]>2024-09-04 19:56:28 +0200
commit80b6fffdf40a04ed7fa719b038ee4d5380dd3a87 (patch)
treea60e80c6d7547b2475e4c3693e80cd85b2565c2f /6p4.cpp
parenta577cee5a0b44aadadd2f0932a794310bb775a83 (diff)
more
Diffstat (limited to '6p4.cpp')
-rw-r--r--6p4.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/6p4.cpp b/6p4.cpp
new file mode 100644
index 0000000..28c6fa5
--- /dev/null
+++ b/6p4.cpp
@@ -0,0 +1,26 @@
+#include <iostream>
+
+/*
+ *
+ * 6.4
+ *
+ *
+ */
+
+uint64_t fact(void) {
+
+ uint64_t val;
+ if(std::cin >> val) {} else { return 0; }
+ uint64_t ret = 1;
+ while(val > 1) {
+ ret *= val--;
+ }
+
+ return ret;
+}
+
+int main () {
+
+ std::cout << fact() << std::endl;
+ return 0;
+}