prime palindrome wrong answer

my code is giving wrong answer for the question

my code is:

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

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


//logic here


// 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: