Advertisement
a53

EliminarePerechiVocale

a53
Jan 17th, 2017
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char s[256];
  8. cin.getline(s,256);
  9. for(char *p=s+strlen(s)-2;p>=s;--p)
  10. if(strchr("aeiou",p[0])&&strchr("aeiou",p[1]))
  11. {
  12. if(p>s&&strchr("aeiou",p[-1]))
  13. strcpy(p,p+1);
  14. else
  15. strcpy(p,p+2);
  16. }
  17. cout<<s<<'\n';
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement