Mitkashin

Palindrom / Lab2.1

Oct 17th, 2016
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int p, a, b;
  6.     scanf("%d",&p);
  7.     if ((p >= 100)&&(p <=999))
  8.     {
  9.         a = p / 100;
  10.         b = p % 10;
  11.         if (a == b)
  12.             printf("Palindrom");
  13.     }
  14.     else
  15.         printf("Ne validen vlez");
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment