char numc[100];
sprintf(numc,"%d",i);
int len=strlen(numc);
for(j=0;j<=len/2;j++){
if(numc[j]!=numc[len-1-j]){
flag=1;
break;
}
}