Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- string s;
- cin >> s;
- int soglaski = 0;
- for(int i = 0; i < s.size() - 1; i++)
- {
- if(s[i] != 'a' and s[i] != 'e'
- and s[i] != 'i' and s[i] != 'o' and s[i] != 'u' and s[i + 1] != 'a' and s[i + 1] != 'e' and s[i + 1] != 'i' and
- s[i + 1] != 'o' and s[i + 1] != 'u')
- {
- soglaski++;
- }
- }
- cout << soglaski << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement