InnaSibirova

Palidrom 4x

Oct 14th, 2019
113
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4.   int a, b, c, d;
  5.   cin >> a;
  6.   d = a % 10;
  7.   c = a / 10 % 10;
  8.   b = a / 100 % 10;
  9.   a = a / 1000;
  10.   if (a == d && b == c) {
  11.     cout << "YES";
  12.   } else {
  13.     cout << "NO";
  14.   }
  15.   return 0;
  16. }
RAW Paste Data