#include <iostream.h>
#include <string>
void main(){
//here we will
declare some variables
string name,
root, indexchar;
int i;
int NameLength,
FirstVowel;
//Now we begin the action
//First we output
a line to the user
cout <<
"Enter a name: ";
//Now we get the
user's response
cin >> name;
//We compute the
length of the input name
NameLength =
name.length();
//Now we use a
loop to find the first vowel
for(i = 0; i
< NameLength; i++){
indexchar
= name.substr(i,1);
if(indexchar
== "a" || indexchar == "e" || indexchar == "i"
|| indexchar == "o" //You
need to put a little bit here){
FirstVowel = i;
break;
//"break" exits the loop it is in
}
}
//Now that we
know where the first vowel is, we can
//select the
substring that starts there
root = name.substr(FirstVowel,
NameLength - FirstVowel);
//We have all
the info we need, so we proceed to output
cout <<
"\n" << name << ", " << name << ", Bo B" <<
root << endl;
//You
should fill in the rest of the output here
}