diff --git a/2024/task4.cpp b/2024/task4.cpp new file mode 100644 index 0000000..4d9d273 --- /dev/null +++ b/2024/task4.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; + +// "456" => "645" +int main () +{ + int a; + + cin >> a; + + int d1, d2, d3; + d1 = a % 10; + d2 = a / 10 % 10; + d3 = a / 100 % 10; + + cout + << d1 + << d3 + << d2 + ; + + return 0; +} \ No newline at end of file