Display all palindromes in one single string entered by user using c++


 void main()  
 {  
 long i,j,n,k,l,v;  
 int flag,u=0,y,x;  
 int shaff[10],shaff1[720][4];  
 char pal[14],pal1[720][14],word[14];  
 clrscr();  
 cout<<"enter the palentrom\n";  
 gets(pal);  
 strcpy(pal1[0],pal);  
 strrev(pal1[0]);  
 if(strcmp(pal1[0],pal)!=0)  
 {  
 cout<<"entered value is not palaentrom\n";  
 getch();  
 exit(0);  
 }  
 y=strlen(pal);  
 if(y%2==0)  
 n=y/2;  
 if(y%2==1)  
 n=(y-1)/2;  
 k=0;  
 for(i=0;i=0;i--)  
 l=l*10+i;  
 for(i=k;i<=l;i++)  
 { v=i;  
 for(j=0;j=n)  
 flag=0;  
 }  
 v=i;  
 if(flag==1)  
 {  
 for(j=0;j[j]=v%10;  
 v=v/10;  
 }  
 u++;  
 }  
 }  
 l=1;  
 for(i=0;i[j]];  
 x++;  
 }  
 if(y%2==1)  
 {  
 word[x]=pal[n];  
 x++;  
 }  
 for(j=n-1;j>=0;j--)  
 {  
 word[x]=pal[shaff1[j]];  
 x++;  
 }  
 word[x]='\0';  
 flag=1;  
 for(k=0;k<=l;k++)  
 {  
 if(strcmp(pal1[k],word)==0)  
 flag=0;  
 }  
 if(flag==1)  
 {  
 strcpy(pal1[l],word);  
 l++;  
 }  
 }  
 cout<<"\n posible palindrome are\n";  
 }  
 getch();  
 }