GoDaddy Interview Question

They asked me to write a code for printing palindrome number.