Advertisement
Guest User

INFO

a guest
Jan 22nd, 2020
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. PB 1335:
  2. #include <iostream>
  3. #include <cstring>
  4. using namespace std;
  5. char s[250],t[250];
  6. int main ()
  7. {
  8. int i;
  9. cin.getline(s,256);
  10. cin.getline(t,256);
  11. for (i=0;i<strlen(s);i++)
  12. {
  13. if (strchr(t,s[i])){
  14. cout<<s[i];
  15. }
  16. }
  17. return 0;
  18. }
  19.  
  20.  
  21.  
  22. PB 609:
  23. #include <iostream>
  24. #include <cstring>
  25. using namespace std;
  26. char s[101],t[101];
  27. int main ()
  28. {
  29. int i;
  30. cin.get(s,101);
  31. for (i=0;i<=strlen(s);i++)
  32. {
  33. if (strchr("aeiou",s[i])!=0)
  34. {
  35. strcpy(t,s+i+1);
  36. s[i+1]=s[i];
  37. strcpy(s+i+2,t);
  38. i++;
  39. }
  40. }
  41. cout<<s;
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement