Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //se citesc 2 cuv,afisati toate caracterele primului cuv ce se gasesc in al doilea
- #include <iostream>
- #include<cstring>
- using namespace std;
- int main()
- {
- char s1[256],s2[256],*p;
- int i;
- cin.getline (s1,256);
- cin.getline(s2,256);
- p=strpbrk(s1,s2);
- while(p)
- {
- cout<<p[0];
- p++;
- p=strpbrk(p,s2);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement