Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main()
  5. {
  6. cout << "enter your text" << endl;
  7. string s;
  8. getline(cin, s);
  9. int size = s.size();
  10. for (int i = 0; i < size; i++)
  11. {
  12. if (s[i] == 'ce')
  13. {
  14. s.replace(s.find("ce"), "se");
  15. }
  16. }
  17. cout << endl << endl;
  18. cout << "your new text" << endl <<s<< endl;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement