From e61e04619d0c9dd4d079532eff3483e234fc8acd Mon Sep 17 00:00:00 2001 From: hybrid Date: Mon, 24 Aug 2026 00:48:14 +0300 Subject: add: lesson{5,6}, CMakeLists.txt --- src/chapter1/lesson5/q2.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/chapter1/lesson5/q2.cpp (limited to 'src/chapter1/lesson5/q2.cpp') diff --git a/src/chapter1/lesson5/q2.cpp b/src/chapter1/lesson5/q2.cpp new file mode 100644 index 0000000..236a1be --- /dev/null +++ b/src/chapter1/lesson5/q2.cpp @@ -0,0 +1,17 @@ +#include + +/* This program will ask user for three numbers, store each in separate + * variables x, y, and z respectively and print the message with their values. + */ +int main() { + std::cout << "Enter three numbers: "; + + int x{}; + int y{}; + int z{}; + std::cin >> x >> y >> z; + + std::cout << "You entered " << x << ", " << y << ", and " << z << ".\n"; + + return 0; +} -- cgit v1.3.1