Capgemini Interview Question

How do you write programme to check given number palindrome or not?

Interview Answer

Anonymous

Jan 25, 2023

First convert the number into a string and assign it as str1. Reverse the str1 and assign it to str2. Now compare str1 and str2, if they are equal it's a palindrome else not a palindrome.