Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main()
- {
- char s1[100], s2[100];
- cin >> s1 >> s2;
- int n1 = strlen(s1), n2 = strlen(s2);
- if (s1[n1 - 1] == s2[n2 - 1] && s1[n1 - 2] == s2[n2 - 2])
- cout << 1;
- else
- cout << 0;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement