#include <iostream>
#include <string>
using namespace std;
int main ()
{
string Name;
cout<<"Enter name : ";
getline (cin, Name);
for (int i = 0; i < Name.length(); i++)
{
char buf = tolower(Name[i]);
if ( buf == 'a' || buf == 'e' || buf == 'i' || buf == 'o' || buf == 'u' || buf == 'y')
Name[i] = '*';
}
cout <<"After processing : "<< Name;
cin.get (); //wait fo "Enter"
return 0;
}
Comments
Leave a comment