Odpowiedź :
Odpowiedź:
#include <iostream>
#include <string>
int main() {
std::string word;
std::cout << "Podaj wyraz:\n";
std::cin >> word;
for (int i = 0; i < word.size(); i++) {
if (i % 3 == 2) {
word[i] = 'y';
}
}
std::cout << word;
return 0;
}
Wyjaśnienie: