Advertisement
edutedu

vr 50

Apr 14th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char a[100];
  8. int i, n, j=0;
  9. cin.get(a, 100);
  10. n=strlen(a);
  11. for(i=0; i<n; i++)
  12. {
  13. if(strchr("aeiou", a[i])!=0)
  14. {a[i]='*';
  15. break;
  16. }
  17. }
  18.  
  19. for(i=n-1; i>=0; i--)
  20. {
  21. if(strchr("aeiou", a[i])!=0)
  22. {a[i]='*';
  23. break;}
  24. }
  25. for(i=0; i<n; i++)
  26. if(a[i]!='*')
  27. cout<<a[i];
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement