check the last digit of both numbers and increase count if different
if ( ( a % 10 ) != ( b % 10 ) ) { c ++ ; } a = a / 10 ; b = b / 10 ; } if ( c == 1 ) { return true ; } else { return false ; } } void makePrimes ( int N ) { int i , j ; int L = pow ( 10 , N - 1 ) ; int R = pow ( 10 , N ) - 1 ;