initial commit

This commit is contained in:
2023-07-16 13:23:25 +00:00
commit c3fa5367c3
85 changed files with 4921 additions and 0 deletions

20
C++/lesson4/task7.cpp Normal file
View File

@ -0,0 +1,20 @@
#include <iostream>
#include <string>
int main() {
std::string s;
std::string f;
std::string r;
std::getline(std::cin, s);
std::getline(std::cin, f);
std::getline(std::cin, r);
size_t pos = s.find(f);
while (pos != std::string::npos) {
s.replace(pos, f.length(), r);
pos = s.find(f);
}
std::cout << s << '\n';
}