Return number of primes in range from index qs ( query start ) to qe ( query end ) . It mainly uses queryPrimesUtil ( )
static void queryPrimes ( int [ ] st , int n , int qs , int qe ) { int primesInRange = queryPrimesUtil ( st , 0 , n - 1 , qs , qe , 0 ) ; Console . WriteLine ( " Number ▁ of ▁ Primes ▁ in ▁ subarray ▁ from ▁ " + qs + " ▁ to ▁ " + qe + " ▁ = ▁ " + primesInRange ) ; }