Check if x is a single digit integer
if ( x < 10 ) break ; int temp2 = 0 ; while ( x ) { temp2 *= 10 ; temp2 += ( x % 10 ) ; x /= 10 ; } x = temp2 ; } if ( ( x < 10 ) && ( N == 0 ) ) { return 1 ; } return 0 ; }