Advertisement
Guest User

Untitled

a guest
Dec 12th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int a, b, c, d, e;
  7. scanf("%i", &a);
  8. b = a/1000; // first
  9. c = (a/100)%10; // second
  10. d = (a%100)/10; // third
  11. e = a%1000; // last
  12. if ((b == e) || (c == d))
  13. printf("YES");
  14. else
  15. printf("NO");
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement