Advertisement
Josif_tepe

Untitled

Sep 12th, 2021
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     string a;
  8.     int b=0,g=0;
  9.     cin >> a;
  10.    
  11.     //cout<<g;
  12.      
  13.           for(int i=1;i<a.length();i++)
  14.           {
  15. //cout<<i<<" ";
  16.               if((a[i]!=('a') && a[i-1]!=('a'))&& (a[i]!=('e') && a[i-1]!=('e')) && (a[i]!=('i') && a[i-1]!=('i')) && (a[i]!=('o') && a[i-1]!=('o')) && (a[i]!=('u') && a[i-1]!=('u')))
  17.               {
  18.                  //cout<<a[i-1]<<" "<<a[i];
  19.                  b++;
  20.               }
  21.           }
  22.  
  23.     cout<<b;
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement