Find the Closest Palindrome | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Find the Closest Palindrome

The program must accept a number N as the input. The program must print the closest palindromic number as the output. If there are two closest palindromic numbers the program must print the smaller n Example Input/Output 1: Input: 124 Output: 121umber.

2nd Aug 2018, 2:31 PM
Gokula Krishnan S
Gokula Krishnan S - avatar
1 Answer
2nd Aug 2018, 4:17 PM
Paul
Paul - avatar