Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PB 1335:
- #include <iostream>
- #include <cstring>
- using namespace std;
- char s[250],t[250];
- int main ()
- {
- int i;
- cin.getline(s,256);
- cin.getline(t,256);
- for (i=0;i<strlen(s);i++)
- {
- if (strchr(t,s[i])){
- cout<<s[i];
- }
- }
- return 0;
- }
- PB 609:
- #include <iostream>
- #include <cstring>
- using namespace std;
- char s[101],t[101];
- int main ()
- {
- int i;
- cin.get(s,101);
- for (i=0;i<=strlen(s);i++)
- {
- if (strchr("aeiou",s[i])!=0)
- {
- strcpy(t,s+i+1);
- s[i+1]=s[i];
- strcpy(s+i+2,t);
- i++;
- }
- }
- cout<<s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement