#include <iostream>
#include <sstream>
#include <string>
std::string vowels("aeiouAEIOU");
bool contains(const std::string& s, char letter)
{
return s.find(letter) != std::string::npos;
}
bool is_vowel(char ch)
{
return contains(vowels, ch);
}
std::istringstream in("These are some words\n. Everyone should know them.");
int main()
{
std::size_t vowels = 0;
char ch;
while (in >> ch)
vowels += is_vowel(ch);
std::cout << "Counted " << vowels << " vowels.\n";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3N0cmVhbT4KI2luY2x1ZGUgPHN0cmluZz4KCnN0ZDo6c3RyaW5nIHZvd2VscygiYWVpb3VBRUlPVSIpOwoKYm9vbCBjb250YWlucyhjb25zdCBzdGQ6OnN0cmluZyYgcywgY2hhciBsZXR0ZXIpCnsKICAgIHJldHVybiBzLmZpbmQobGV0dGVyKSAhPSBzdGQ6OnN0cmluZzo6bnBvczsKfQoKYm9vbCBpc192b3dlbChjaGFyIGNoKQp7CiAgICByZXR1cm4gY29udGFpbnModm93ZWxzLCBjaCk7Cn0KCnN0ZDo6aXN0cmluZ3N0cmVhbSBpbigiVGhlc2UgYXJlIHNvbWUgd29yZHNcbi4gIEV2ZXJ5b25lIHNob3VsZCBrbm93IHRoZW0uIik7CgppbnQgbWFpbigpCnsKICAgIHN0ZDo6c2l6ZV90IHZvd2VscyA9IDA7CiAgICBjaGFyIGNoOwoKICAgIHdoaWxlIChpbiA+PiBjaCkKICAgICAgICB2b3dlbHMgKz0gaXNfdm93ZWwoY2gpOwoKICAgIHN0ZDo6Y291dCA8PCAiQ291bnRlZCAiIDw8IHZvd2VscyA8PCAiIHZvd2Vscy5cbiI7Cn0=