Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string text, vowels = "aeiou";
- getline(cin, text);
- for (int i = 1; i < text.length(); i++) {
- if (text[i - 1] == text[i] && vowels.find(text[i]) == -1) {
- text.erase(i, 1);
- i--;
- }
- }
- cout << text << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement