Breaking

range of palindrome number




   //   pelindrome NUMBER BETWEN 1-1000
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,rem,rev,n, a;
printf(" Enter a number : ") ;
scanf(" %d", & a) ;
for(i=1; i<a; i++)
{
          n=i;
          rev=0;
          while(n!=0)
         {
                  rem=n%10;
                  rev=rev*10+rem;
                  n=n/10;
         }
          if(i==rev)
          {
                 printf(" it is a pelindrom= %d\n",rev);
          }
}

getch();
}

Simple Output :
Enter a number : 100
it is a pelindrom= 1
 it is a pelindrom= 2
 it is a pelindrom= 3
 it is a pelindrom= 4
 it is a pelindrom= 5
 it is a pelindrom= 6
 it is a pelindrom= 7
 it is a pelindrom= 8
 it is a pelindrom= 9
 it is a pelindrom= 11
 it is a pelindrom= 22
 it is a pelindrom= 33
 it is a pelindrom= 44
 it is a pelindrom= 55
 it is a pelindrom= 66
 it is a pelindrom= 77
 it is a pelindrom= 88
 it is a pelindrom= 99