Website Summary Files Commits Branches @commit @diff @stats
path: root / Week11 / Exercise01.cpp
diff options
context:
space:
mode:
1 files changed, 13 insertions, 0 deletions
-rw-r--r--Week11/Exercise01.cpp13
diff --git a/Week11/Exercise01.cpp b/Week11/Exercise01.cpp
new file mode 100644
index 0000000..784c5ac
--- /dev/null
+++ b/Week11/Exercise01.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+int main() {
+ const unsigned NAME_LENGTH = 20;
+
+ // 20 букви за името и 1 буква за терминиращата нула
+ char name[NAME_LENGTH + 1];
+ std::cin.getline(name, NAME_LENGTH + 1);
+
+ std::cout << "Hello, " << name << "!" << std::endl;
+
+ return 0;
+}