prime palindrome wrong answer

my code is giving wrong answer for the question


my code is:
http://www.codechef.com/viewsolution/3636679

someone plzz help me out…what is wrong with my code?

there is a problem in your code. do it this way:

while(1){

//logic here

a++;
}

// i.e instead of incrementing a before if statement, do it after the if statements.

// since it is mentioned in the problem that M>=N (M can be equal to N).

oh finally…i got it correct…
thanks a lot for helping me out with this :slight_smile: