Website Summary Files Commits Branches @commit @diff @stats
path: root / Week05 / Exercise15.cpp
diff options
context:
space:
mode:
1 files changed, 16 insertions, 0 deletions
-rw-r--r--Week05/Exercise15.cpp16
diff --git a/Week05/Exercise15.cpp b/Week05/Exercise15.cpp
new file mode 100644
index 0000000..6a874bc
--- /dev/null
+++ b/Week05/Exercise15.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+
+int main() {
+ const unsigned int SIZE = 12;
+
+ double numbers[SIZE];
+ for (unsigned int i = 0; i < SIZE; i++) {
+ std::cin >> numbers[i];
+ }
+
+ for (unsigned int i = 0; i < SIZE / 2; i++) {
+ std::cout << numbers[i] << ' ' << numbers[SIZE - 1 - i] << std::endl;
+ }
+
+ return 0;
+}