The meaning of the problem is such that 2 figures are taken from the number (1 and last) and compared. Screenshot is a working program on python. That's about what I myself tried to write in C ++, but the program does not work. 
#include <iostream> using namespace std; #includ <conio.h> int main() { int n, a; cin >> n; { int a = n % 10; } while (n // 10 != 0) { n = n // 10; } if (a == n) { cout << "YES, n" << endl; } else { cout "No" << endl; } return 0; }
/- Harry