Advertisement
Guest User

Untitled

a guest
Dec 4th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int num;
  7.     scanf ("%d", &num);
  8.     int digit, t = 0, save = num;
  9.     while(num != 0)
  10.     {
  11.         digit = num % 10;
  12.         t = t * 10 + digit;
  13.         num /= 10;
  14.     }
  15.     if (save == t)
  16.         printf("Yes");
  17.     else
  18.         printf ("No");
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement