#include #include #include #include #include #include using namespace std; using namespace std::literals; string const vowels{"aeiouy"}; string encode(string word) { ostringstream oss{}; transform(begin(word), end(word), ostream_iterator{oss}, [](char c) { if (isalpha(c) && find(begin(vowels), end(vowels), c) == end(vowels)) return c + "o"s + c; return ""s + c; }); return oss.str(); } int main() { cout << "Mata in din text: "; vector words {istream_iterator{cin}, istream_iterator{}}; transform(begin(words), end(words), begin(words), [](string word) { return encode(word); }); copy(begin(words), end(words), ostream_iterator{cout, " "}); cout << endl; }