Deepak and Primes

My code is not printing anything what is wrong

https://online.codingblocks.com/app/player/56384/content/44335/5057/code-challenge

there are two problems:

  1. print i-1 instead of i in the last line of code.
    2.inside sieve() method, take i, j as long int, since when i will be large, j = i*i will give absurd answers.

thanks

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.