Cognizant Interview Question

Write a code to check if the number is a palindrome