fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. bool vocala(char ch){
  6. return ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u';
  7. }
  8.  
  9. int lungime(char s[]){
  10. int i = 0;
  11. while(s[i])
  12. i++;
  13. return i;
  14. }
  15.  
  16. int main()
  17. {
  18. char s[21];
  19. cin >> s;
  20. int n = lungime(s);
  21. for(int i = 0; s[i]; i++){
  22. if(vocala(s[i])){
  23. for(int j = i + 1; j <= n + 1; j++)
  24. s[j - 1] = s[j];
  25. n--;
  26. i--;
  27. }
  28. }
  29. cout << s;
  30. return 0;
  31. }
Success #stdin #stdout 0.01s 5280KB
stdin
aeiou
stdout
Standard output is empty