How can I generate all prime numbers in range 1-10^12...
==================
I Tried with segmeted sieve, but I am not getting values over 10^6... Please give me the instructions or the modified segmented sieve code(it will be really helpful if you give me the code) so tha I can learn by debugging it..!!
Thanks in Advance..!!