Advertisement
Guest User

Untitled

a guest
Sep 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6. int a;
  7. int c = 0;
  8. int b = 10;
  9. int d = 0;
  10. scanf("%d", &a);
  11. if (a < 10 || a > 99)
  12. {
  13. printf("Число не десятичное!");
  14. exit(0);
  15. }
  16. c = a / b;
  17. d = a % b;
  18. if (c == d)
  19. {
  20. printf("Палиндром");
  21. }
  22. else
  23. {
  24. printf("Не палиндром");
  25. }
  26. return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement