1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
int _tmain(int argc, _TCHAR* argv[])
{
char firstname[256];
char surname[256];
cout << " please enter first name \n ";
cin.getline(firstname, 256);
cout << " enter surname please \n ";
cin.getline(surname, 256);
string f = firstname;
string s = surname;
replace( f.begin(), f.end(), 'a' , 'z');
replace( f.begin(), f.end(), 'e' , 'z');
replace( f.begin(), f.end(), 'i' , 'z');
replace( f.begin(), f.end(), 'o' , 'z');
replace( f.begin(), f.end(), 'u' , 'z');
replace( s.begin(), s.end(), 'a' , 'z');
replace( s.begin(), s.end(), 'e' , 'z');
replace( s.begin(), s.end(), 'i' , 'z');
replace( s.begin(), s.end(), 'o' , 'z');
replace( s.begin(), s.end(), 'u' , 'z');
cout << f << " " << s;
cin.get();
cin.get();
return 0;
}
| |