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