Erotosthenes prime sieve problem

My code is giving wrong answers for big inputs.
Please help

You need to find primes upto a number larger than 500000. Try to figure it out, if you aren’t able to solve it, I will share the code.

can you share your code sir?

Here https://ide.codingblocks.com/s/306240

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.