Advertisement
Guest User

Untitled

a guest
Feb 17th, 2018
1,910
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. const string V = "aeiouy";
  6.  
  7. bool vowel(char c)
  8. {
  9. return V.find(c) != -1;
  10. }
  11.  
  12. int main()
  13. {
  14. int n;
  15. cin >> n;
  16. string s;
  17. cin >> s;
  18. cout << s[0];
  19. for(int i = 1; i < n; i++)
  20. if (!vowel(s[i - 1]) || !vowel(s[i]))
  21. cout << s[i];
  22. cout << endl;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement