Advertisement
Josif_tepe

Untitled

Feb 18th, 2022
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string s;
  8.     cin >> s;
  9.     int soglaski = 0;
  10.     for(int i = 0; i < s.size() - 1; i++)
  11.     {
  12.         if(s[i] != 'a' and s[i] != 'e'
  13.         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
  14.          s[i + 1] != 'o' and s[i + 1] != 'u')
  15.         {
  16.             soglaski++;
  17.         }
  18.  
  19.     }
  20.     cout << soglaski << endl;
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement