Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- char cc[31];
- void fnd(char c[])
- {
- for(int i=0; i<=strlen(c); i++)
- {
- if(strchr("aeiou",c[i]))
- {
- strcpy(cc,c+i);
- }
- }
- }
- int main()
- {
- char s[260];
- char crt[31];
- cin.getline(s,260);
- //cin.ignore();
- cin>>crt;
- fnd(crt);
- strcpy(crt,cc);
- cout<<cc<<endl;
- char *p;
- p=strtok(s," ");
- char crt2[30];
- while(p)
- {
- strcpy(crt2,p);
- fnd(crt2);
- strcpy(crt2,cc);
- if(strcmp(crt2,crt)==0)
- {
- cout<<p<<endl;
- }
- p=strtok(NULL," ");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement