Sir pls tell whats the error in the.. it is regarding finding prime or not for large numbers

There is some issue when using
if(no<=n){
return primes[no]==1?true:false;
}

if u simply do
if(primes[n]){
cout<<“Not prime”<<endl;
}
else{
cout<<“Prime”<<endl;
}
then it will work fine
else
if u want to do it for even bigger no please follow the entire content of the video
using bitset and vector as Prateek bhaiya has taught in video

but what is the problem in this code if i have to find if the number is prime or not for large numbers…

the only difference being i havent used vector and bitset while rest all the logic is same

if(isPrime(no)){
cout<<“prime”<<endl; // yaha u were printing not prime
}
else{
cout<<“not Prime”<<endl; // and here prime the condition are opposite
}

no i tried reversing the other way also… still ans is not coming…

pls tell whats the error in this code

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.