i have finaly make this program work the way i wanth.. thanks guys...
this is the code that i have used..
Code:
#include <stdio.h>
void main()
{
int a , b, c, d;
int n;
int temp;
printf("Enter a five-digit number ( -1 to end ): \n");
scanf("%d",&n);
while(n!=-1)
{
a =n /10000;
temp=n%10000;
b =temp /1000;
temp=n % 100;
c=temp/10;
temp=n%10;
d =temp/1;
if(a == d && b == c)
{
printf("%d is a palindrome\n" , n);
printf("Enter a five-digit number ( -1 to end ): \n");
scanf("%d",&n);
}
else
{
printf("%d is not a palindrome\n" , n);
printf("Enter a five-digit number ( -1 to end ): \n");
scanf("%d",&n);
}
}
}