Homework/HW05/porter.cc
bool vowel ( char ch, char prev )
{
    switch ( ch ) 
    {
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u': return(true);
        break;
    case 'y': return( vowel(prev,'?') == true );
        break;
    default : return(false);
        break;
    }
}
// returns true if the character is a vowel. It needs the previous
// character because y is considered a vowel only when preceded by a
// vowel.
returns true if the character is a vowel. It needs the previous
character because y is considered a vowel only when preceded by a
vowel.
returns true if the character is a vowel . It needs the previous character because y is considered a vowel only when preceded by a vowel .
bool vowel ( char ch, char prev )
{
    switch ( ch ) 
    {
    case 'a':
    case 'e':
    case 'i':
    case 'o':
    case 'u': return(true);
        break;
    case 'y': return( vowel(prev,'?') == true );
        break;
    default : return(false);
        break;
    }
}
bool vowel ( char ch , char prev ) { switch ( ch ) { case ' ' : case ' ' : case ' ' : case ' ' : case ' ' : return ( true ) ; break ; case ' ' : return ( vowel ( prev , ' ' ) == true ) ; break ; default : return ( false ) ; break ; } }
returns true if the character is a vowel.
returns true if the character is a vowel .