Want logic for palindrome | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 1

Want logic for palindrome

logic for finding whether the string is palindrome or not

15th Oct 2017, 5:32 AM
swagat
swagat - avatar
3 ответов
15th Oct 2017, 5:57 AM
Nanda Balakrishnan
+ 2
hi swagat,  examples are 121, 212, 12321, -454. To check whether anumber is palindrome or not first we reverse it and then compare the number obtained with the original, if both are same then number is palindrome otherwise not a palindrome
15th Oct 2017, 5:53 AM
Nanda Balakrishnan
+ 2
thanks
15th Oct 2017, 5:55 AM
swagat
swagat - avatar