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