On ps1a, and I don't understand why this returns all of the correct primes... but also a bunch of randomly distributed composite numbers. For example, the first that appears is 95. I know this isn't the best or fastest way to solve this problem, but I don't understand where these random numbers are coming from, it seems like it should work. Can anyone offer any advice? http://pastebin.com/wA2AgDfZ

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

Looking for something else?

Not the answer you are looking for? Search for more explanations.