Codeforces 908A New Year and Counting Cards

Codeforces 908A New Year and Counting Cards

#include
#include
using namespace std;
char s[50];
bool even(char a){
	if(a >= '0' && a <= '9' && (int)a % 2 != 0)
		return true;
	return false;
}
int main(){
	cin >> s;
	int sum = 0;
	for(int i = 0; i < strlen(s); i++){
		if(s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' || s[i] == 'u' || even(s[i]))
			sum++;
	}
	cout << sum << endl;		
}

你可能感兴趣的:(Codeforces 908A New Year and Counting Cards)