getline(cin, s);
cout << "Qidiriladigan satrni kiriting="; getline(cin, c);
cout << "Almashtiriladigan satrni kiriting="; getline(cin,s1);
index = s.find(c);
while (index < s.length())
{
s.replace(index, c.length(), s1);
index = s.find(c, index + s1.length());
}
cout << s << endl;
system("pause");
return 0;
}
Dostları ilə paylaş: