Advertisement
Josif_tepe

Untitled

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