blob: 84455bf78a20130144b311548d414e93e5deb7db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <string>
#include <algorithm>
#include <iostream>
int main( ) {
std::cout << "Enter a string!\n" ;
std::string line ;
std::getline( std::cin , line ) ;
std::string vowels {"aeiouAEIOU"} ;
std::cout << std::boolalpha << (std::count_if( line.begin( ) , line.end( ),
[vowels]( char c ) { return vowels.find( c ) != std::string::npos ;
} ) % 2 == 0 ) << '\n' ;
return 0 ;
}
|