Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 13 Online
OpenStudy (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?

OpenStudy (anonymous):

Can't access your code page. Can you please repost?

OpenStudy (anonymous):

Never mind. I see it now.

OpenStudy (anonymous):

remove the dot http://codepaste.net/4dirtt

OpenStudy (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

OpenStudy (anonymous):

Here's the output of the code. http://pastebin.com/KD4A70zj

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
3 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
3 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!