Untitled
unknown
plain_text
a year ago
569 B
2
Indexable
Never
#include <iostream> #include <string> #include <vector> #include "windows.h" using namespace std; int main() { SetConsoleOutputCP(CP_UTF8); string input; cout << "Введите строку: "; getline(cin, input); vector<char> output; for (int i = 0; i < input.length(); i += 4) { output.push_back(input[i]); output.push_back(input[i + 1]); } cout << "Результат: "; for (char *p = &output[0]; p != &output[0] + output.size(); ++p) { cout << *p; } cout << endl; }