Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main()
- {
- char s1[250], s2[250];
- char* p;
- cin >> s1 >> s2;
- // Dublez primu sir aka il fac circular (asta e cea mai complicata parte din toata problema :)) )
- strcpy(s1 + strlen(s1), s1);
- p = strstr(s1, s2);
- if (p != NULL)
- cout << "S2 e subsir in S1\n";
- else
- cout << "S2 NU e subsir in S1\n";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement