m2skills

smallest palindrome op

Apr 18th, 2017
1,165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1.  
  2. Enter the number :5
  3. The next smallest palindrome is : 11
  4. Do you want to continue (1/0) : 1
  5.  
  6. Enter the number :999
  7. The next smallest palindrome is : 1001
  8. Do you want to continue (1/0) :1
  9.  
  10. Enter the number : 1234
  11. The next smallest palindrome is : 1331
  12. Do you want to continue (1/0) :1
  13.  
  14. Enter the number : 1221
  15. The next smallest palindrome is : 1331
  16. Do you want to continue (1/0) :1
  17.  
  18. Enter the number : 12921
  19. The next smallest palindrome is : 13031
  20. Do you want to continue (1/0) :1
  21.  
  22. Enter the number : 129921
  23. The next smallest palindrome is : 130031
  24. Do you want to continue (1/0) : 1
  25.  
  26. Enter the number :783322
  27. The next smallest palindrome is : 783387
  28. Do you want to continue (1/0) : 1
  29.  
  30. Enter the number :125322
  31. The next smallest palindrome is : 125521
  32. Do you want to continue (1/0) :1
  33.  
  34. Enter the number :713322
  35. The next smallest palindrome is : 714417
  36. Do you want to continue (1/0) :1
  37.  
  38. Enter the number :1234628
  39. The next smallest palindrome is : 1235321
  40. Do you want to continue (1/0) :0
Add Comment
Please, Sign In to add comment