masterm1nd99

paaaaaaaaaaaaa

Dec 11th, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2. int obraten (int n, int obt)
  3. {
  4. if(n==0)
  5. {
  6. return obt;
  7. }
  8. else {
  9. obt=obt*10+n%10;
  10. return obraten(n/10,obt);
  11. }
  12. }
  13. int main()
  14. {
  15. int n, sum=0;
  16. scanf("%d", &n);
  17. sum = n+obraten(n,0);
  18. if( sum== obraten(sum,0))
  19. {
  20. printf("E palindrom");
  21. }
  22. else
  23. {
  24. printf("Ne e palindrom");
  25. }
  26. return 0;
  27. }
Add Comment
Please, Sign In to add comment