FIND ALL PALINDROMIC

Discuss Computer Science and Programming related problems

Moderators:Labib, bristy1588

MATHPRITOM
Posts:190
Joined:Sat Apr 23, 2011 8:55 am
Location:Khulna
FIND ALL PALINDROMIC

Unread post by MATHPRITOM » Sat Feb 04, 2012 8:15 pm

Write down a program that prints all the palindromic number in a certain range.
Example:
Enter a number:100.
The palindromic number upto 100 are 1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99.

novice
Posts:31
Joined:Sun Dec 12, 2010 12:34 am

Re: FIND ALL PALINDROMIC

Unread post by novice » Sat Feb 04, 2012 11:33 pm

From palindromes having 2n-1 digits,we get palindromes of 2n+1 digits by simply by adding the same digit back and front,which in turn can be saved into arrays to find palindromes having 2n+3 digits.
Pretty much the same thing for even digited palindromes.

Post Reply