Advertisement
RusSimona

Varianta50 Sub2 Ex5

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