Re: Prime Numbers
Originally Posted by
rockx
I have got another question. the above code simply works fine. but is there any other way possible to further modify this
Of course there is. Prime number generation is one of the most-researched subjects in computer sciences and mathematics, so there's plenty of other variations out there to study.
This particular line does what its supposed to do:
however, is there any way possible to replace 'j' wtih all the numbers that have actually been generated?
What are you asking for? j already is being replaced with all candidate numbers to check for being an integral divider, time-sequentially within the loop.
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.