prime palindromes

#include
#include<stdio.h>
#include<math.h>

using namespace std;
#define TRUE 1
#define FALSE 0

int main() {

int n; int boolean , i , j , temp ,temp1;

scanf("%d",&n);
	for(  i = n  ; i<= 1000000 ; i++)
	{
		boolean = TRUE;
		
		temp1 = i ;
			while( temp1 != 0 )
			{
				temp = temp*10 + temp1 % 10;
				temp1 /=10;
			}	
			
			if( i!= temp)
			boolean = FALSE;
			
		
		if(boolean == TRUE)
		{
			for( j=2 ; j <= sqrt(i) ; j++)
			{
				if( i % j == 0)
				{
					boolean = FALSE;
					break;
				}
			}
			
		}
		
		if(boolean == TRUE)
		{
			printf ("%d",i);
			break;
		}
	}
return 0;

}

i did the same thing as CodeChef: Practical coding for everyone solution but mine code is not getting accpted why???

i got it …
temp = 0 ; is missing