aboutsummaryrefslogtreecommitdiff
path: root/week03/exercise04.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'week03/exercise04.cpp')
-rw-r--r--week03/exercise04.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/week03/exercise04.cpp b/week03/exercise04.cpp
new file mode 100644
index 0000000..fb37716
--- /dev/null
+++ b/week03/exercise04.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+int main() {
+ int num = 65536;
+ int input;
+ for (int i = 0; i < 10; i++) {
+ std::cin >> input;
+ if (input == 0) break;
+
+ num /= input;
+ }
+ std::cout << num << std::endl;
+}