Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char s[255],t[255];
  5. int i;
  6. int main()
  7. {
  8. cin.getline(s, sizeof(s));
  9. cin.getline(t, sizeof(t));
  10. for (i = 0; i < strlen(s); i++)
  11. if (strchr(t,s[i]))cout<<s[i];
  12. return 0;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement