Deepak and primes


not providing output kindly explain the reason

@shiniagarwal25 you have to count upto nth prime number but you are running your for loop till n, run for loop till max size and break the loop after printing the output.
one more thing you have to print max 5000000th prime number that lies around 10^8 so take max size of your p array 10^8 and check prime upto 10^8.


made the changes still showing error

have you tried submitting this code on hackerblocks cause your code is getting passed with me.
online ide is facing some technical issue so direct submit it there.

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.