import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
String str1 = sc.nextLine();
for (int k = 0; k < n; k++) {
int a = 0;
int e = 0;
int i = 0;
int o = 0;
int u = 0;
String str = sc.nextLine();
for (int j = 0; j < str.length(); j++) {
char t = str.charAt(j);
if (t == 'a') {
a++;
}
if (t == 'e') {
e++;
}
if (t == 'i') {
i++;
}
if (t == 'o') {
o++;
}
if (t == 'u') {
u++;
}
}
System.out.println("a:" + a);
System.out.println("e:" + e);
System.out.println("i:" + i);
System.out.println("o:" + o);
System.out.println("u:" + u);
if (k < n - 1) {
System.out.println("");
}
}
}
}
}
杭电 2027 ( 统计元音 ) java
最新推荐文章于 2022-04-05 20:28:40 发布