Advertisement
STANAANDREY

pb 7

Oct 1st, 2019
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     char s1[100], s2[100];
  8.     cin >> s1 >> s2;
  9.     int n1 = strlen(s1), n2 = strlen(s2);
  10.     if (s1[n1 - 1] == s2[n2 - 1] && s1[n1 - 2] == s2[n2 - 2])
  11.         cout << 1;
  12.     else
  13.         cout << 0;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement