We first convert to given base , then check if the converted number has two consecutive 0 s or not
void hasConsecutiveZeroes ( int N , int K ) { int z = toK ( N , K ) ; if ( check ( z ) ) cout << " Yes " << endl ; else cout << " No " << endl ; }