ioanaasdfgh

Untitled

Feb 11th, 2019
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. char s[21],*p, voc[]="aeiou",m[21];
  9. cout<<"dati sirul ";
  10. cin.get(s,50);
  11. cin.get();
  12. int ok=1;
  13. for(int i=0;i<strlen(s);i++)
  14.  if(strchr(voc,s[i]))
  15.  ok=0;
  16. m[0]=0;
  17. strncat(m,s,i-1);
  18. strcat(m,s+i);
  19. strcpy(s,m);
  20. ok=1;
  21. for(i=strlen(s)-1;i>=0;i--)
  22.  if(strchr(voc,s[i]))
  23.  ok=0;
  24. m[0]=0;
  25. strncat(m,s,i+1);
  26. strcat(m,s+i+2);
  27. strcpy(s,m);
  28. cout<<s;}
Add Comment
Please, Sign In to add comment