josiftepe

Untitled

Nov 15th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. bool dali_e_soglaska(char c) {
  6.     if(c != 'a' and c != 'e' and c != 'i' and c != 'o' and c != 'u') {
  7.         return true;
  8.     }
  9.     return false;
  10. }
  11. int main()
  12. {
  13.  string zbor;
  14. cin>>zbor;
  15. int tezina=0;
  16. /// stvarnost
  17. for(int i=0;i<zbor.size()-1;i++){
  18.     if(dali_e_soglaska(zbor[i]) and dali_e_soglaska(zbor[i + 1])) {
  19.         tezina += 1;
  20.     }
  21.  
  22. }
  23. cout<<tezina<<endl;
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment