为毛看不出错误!
# include<iostream>
# include<string>
# include<cctype>
using namespace std;
int main()
{
string word;
cin>>word;
int i,j,k;
i=j=k=0;
while(word!="q")
{
cin.get();
i++;
while(isalpha(word[0]))
{
switch(word[0])
{
case 'A':
case 'a':
case 'E':
case 'e':
case 'O':
case 'o':
case 'U':
case 'u':
case 'I':
case 'i':j++;
break;
default: k++;
};
cin>>word;
};
};
cout<<j<<" words beginning with vowels"<<endl;
cout<<k<<" words beginning with consonants"<<endl;
cout<<i-j-k<<" others"<<endl;
return 0;
}