Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- string s;
- cin >> s;
- char ch = 'x';
- // don't forget the '=' in the for-loop condition
- for (int i = 0; i <= (int) s.size(); i++) {
- cout << s.substr(0, i) + ch + s.substr(i) << '\n';
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement