题目:https://vjudge.net/contest/274223#problem/I
解题思路:注意回车键对字符串输入的影响!!!
#include
using namespace std;
int main()
{
int n;
char p;
cin>>n;
cin.get();
while(n–)
{
int a=0,e=0,i=0,o=0,u=0;
while((p=cin.get())!=’\n’)
{
if(p==‘a’)a++;
if(p==‘e’)e++;
if(p==‘i’)i++;
if(p==‘o’)o++;
if(p==‘u’)u++;
}
cout<<“a:”<<a<<"\ne:"<<e<<"\ni:"<<i<<"\no:"<<o<<"\nu:"<<u<<endl;
if(n) cout<<endl;
}
}