Advertisement
Dizzy3113

Untitled

Nov 10th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. int palindrom(int n)
  2. {
  3. int nr, ogl=0;
  4. nr = n;
  5. while(n)
  6. {
  7. int c = n%10;
  8. ogl = ogl*10 + c;
  9. n = n/10;
  10. }
  11. if(nr == ogl)
  12. return 1;
  13. else
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement