1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
| #include<stdio.h>
#include<string.h>
int main() {
int j,n,a,e,i,o,u;
char s[110];
scanf("%d",&n);
getchar();
while(n--) {
gets(s);
for(j=a=e=i=o=u=0; j<strlen(s); j++) {
if(s[j]=='a')
a++;
else if(s[j]=='e')
e++;
else if(s[j]=='i')
i++;
else if(s[j]=='o')
o++;
else if(s[j]=='u')
u++;
}
printf("a:%d\ne:%d\ni:%d\no:%d\nu:%d\n",a,e,i,o,u);
if(n!=0)
printf("\n");
}
return 0;
}
|