Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QCoreApplication>
- #include <QTextStream>
- #include <QString>
- #include <QChar>
- #include <string>
- #include <QDebug>
- int main()
- {
- QTextStream out(stdout);
- QTextStream in(stdin);
- out << "Enter text: " << endl;
- QTextStream s(stdin);
- QString text=s.readLine();
- int a = text.size();
- for (int i = 0; i <a ; i++) {
- if (text[i] == 'k' || text[i] == 'l') {
- for (int j = i; j < a; j++)
- {
- if (text[j + 1] == 'k' || text[j + 1] == 'l' || text[j + 1] == 'm') {
- out << endl;
- break;
- }
- text[j-i] = text[i+1];
- out << text[j+1];
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement