package temp;
import java.util.Scanner;
public class Temp {
/**
* 得到输入的字符串
*
* @return
*/
public String getString() {
Scanner scn = new Scanner(System.in);
String str = scn.next();
return str;
}
/**
* Main方法
*
* @param args
*/
public static void main(String[] args) {
Temp temp = new Temp();
String str = temp.getString();
int count = temp.getCount(str);
System.out.println("元音字母个数为" + count);
}
/**
* 获得数量
*
* @param str
* @return
*/
public int getCount(String str) {
int count = 0;
char[] exam = { 'a', 'e', 'i', 'o', 'u' };
for (int i = 0; i < str.length(); i++) {
for (int j = 0; j < exam.length; j++) {
if (str.charAt(i) == exam[j]) {
count++;
}
}
}
return count;
}
}