Ответы
Ответ дал:
0
#include <iostream>
#include <string>
int main()
{
std::string x;
std::cin >> x;
int p = x.find("kap");
while (p > 0)
{
x.replace(p, 3, "akp");
p = x.find("kap");
}
std::cout << x;
return 0;
}
#include <string>
int main()
{
std::string x;
std::cin >> x;
int p = x.find("kap");
while (p > 0)
{
x.replace(p, 3, "akp");
p = x.find("kap");
}
std::cout << x;
return 0;
}
Вас заинтересует
2 года назад
8 лет назад
10 лет назад
10 лет назад