#include<iostream.h>
#include<ctype.h>
int main()
{
char ch;
int aCnt=0,eCnt=0,iCnt=0,oCnt=0,uCnt=0;
int consonantCnt=0,ffCnt=0,flCnt=0,fiCnt=0;
while(cin.get(ch))
switch(ch)
{
case'a':
case'A':
++aCnt ;
break;
case'e':
case'E':
++eCnt ;
break;
case'i':
case'I':
++iCnt ;
break;
case'o':
case'O':
++oCnt ;
break;
case'u':
case'U':
++uCnt ;
break;
case'f':
++consonantCnt;
cin.get(ch);
switch(ch)
{
case'f':
++consonantCnt;
++ffCnt;
break;
case'i':
++consonantCnt;
++iCnt;
++fiCnt;
break;
case'l':
++consonantCnt;
++flCnt;
break;
default:cin.putback(ch);
break;
}
default:if(isalpha(ch))
++consonantCnt;
break;
}
cout<<"a:"<<aCnt<<endl;
cout<<"e:"<<eCnt<<endl;
cout<<"i:"<<iCnt<<endl;
cout<<"o:"<<oCnt<<endl;
cout<<"u:"<<uCnt<<endl;
cout<<"consonant:"<<consonantCnt<<endl;
cout<<"ff:"<<ffCnt<<endl;
cout<<"fi:"<<ffCnt<<endl;
cout<<"fl:"<<ffCnt<<endl;
return 0;
}
呵呵不知道..有些内容还没看到呢...