Find words with alternating vowels and consonants: Difference between revisions
Find words with alternating vowels and consonants (view source)
Revision as of 15:26, 23 January 2021
, 3 years agoC++ code made more readable
(Swift - simplified code) |
(C++ code made more readable) |
||
Line 706:
}
return false;
}
bool alternating_vowels_and_consonants(const std::string& str) {
return true;
}
Line 717 ⟶ 725:
std::string line;
for (int n = 1; getline(in, line); ) {
▲ continue;
▲ for (size_t i = 1; i < len; ++i) {
▲ if (is_vowel(line[i]) == is_vowel(line[i - 1])) {
▲ }
std::cout << std::setw(2) << n++ << ": " << line << '\n';
}
|