why my code not giving nay output
Https://ide.codingblocks.com/s/267418
hello @Aditya-Kushwaha-914550392281281
you are accessing index 500000 and for that ur p array size should be atleast 500001
so change it as shown and then it will work fine.
![]()
still not working bhaiya
bhaiya but it is not showing the correct output
output will either be 1 or 0.
if it is 1 that means n is prime
otherwise it is not prime.
and that is what ur code is showing
why no one is not answering
checking bro,
sorry for late reply was busy with clg exams.
its ohk bhaiya i can understand
https://ide.codingblocks.com/s/280110 why it snot clearing any testcase i make sure that the output not overfloew still its not clearing test cases
ur sieve size is not sufficient,pls refer this->
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.