Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string vowelsTextReducer(string s) {
- string vowels = "aeiouy", text = "";
- for (int i = 0; i < s.length(); i++) {
- if (vowels.find(tolower(s[i])) != -1) {
- text += s[i];
- }
- }
- return text;
- }
- int main() {
- string text;
- cin >> text;
- cout << vowelsTextReducer(text).length() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement