#include<iostream> #include<string> using namespace std; void main(){ unsigned n=0; while(cin>>n){ bool t=true; while(n--){ unsigned a,e,i,o,u; a=e=i=o=u=0; char s[100]; if(t){ t=false; getchar(); } gets(s); for(int j=0;s[j]!='\0';++j){ switch(s[j]){ case 'a':++a; break; case 'e':++e; break; case 'i':++i; break; case 'o':++o; break; case 'u':++u; break; default: break; } } cout<<"a:"<<a<<endl; cout<<"e:"<<e<<endl; cout<<"i:"<<i<<endl; cout<<"o:"<<o<<endl; cout<<"u:"<<u<<endl; if(n!=0) cout<<endl; } } }
杭电ACM 第2027题
最新推荐文章于 2021-04-18 23:14:19 发布