#include<iostream> #include<string> using namespace std; string getText() { string text; cout << "Enter your text: "; //1 getline(cin, text); return text; } string text; { for (int a = 0; a < text.length(); a++) //2 { switch (text[a]) { case 'a': case 'e': case 'i': case 'o': case 'u': case 'A': case 'E': case 'I': case 'O': case 'U': text.erase(a, 1); a--; } return text; } int main() { text = getText(); cout << text << endl; //3 system("pause"); return 0; }