anonymous
  • anonymous
Help with ps1, printing the 1000th prime number. After a lot of trial and error I thought I was on the right track. Now I am stuck. http://codepaste.net/4dirtt. Suggestions? Should I just start over with a totally different approach?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
Can't access your code page. Can you please repost?
anonymous
  • anonymous
Never mind. I see it now.
anonymous
  • anonymous
remove the dot http://codepaste.net/4dirtt

Looking for something else?

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

More answers

anonymous
  • anonymous
I inserted some print statements in your code for debugging. You can tell by running the modified app that you are not correctly generating the prime numbers. Take a closer look at what's going with your if statement. http://pastebin.com/jqve8bcg
anonymous
  • anonymous
Here's the output of the code. http://pastebin.com/KD4A70zj

Looking for something else?

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