123456789101112131415161718
#include <iostream> using namespace std; int main() { char *text; text = new char[]; cout << "Insert the string" << endl; cin >> text; for (int i=0;text[i]!='\0';i++) { if (text[i]=='a' || text[i]=='e' || text[i]=='i' || text[i]=='o' || text[i]=='u' || text[i]=='A' || text[i]=='E' || text[i]=='I' || text[i]=='O' || text[i]=='U') { text[i]=' '; } } cout << text; return 0; }
"ThisIsATest!" => "Th s s T st!"
"ThisIsATest!" => "ThssTst!!"