Man it is times like these when I know how non-mathy my brain is. I got all the primes between 1 and 1000 but my code is ungainly and ugly and I kind of just printed 2, 3, 5, and 7 before I got the ball rolling on the rest by nesting 'if' and n%2!=0, n%3!=0 ... etc.
Anybody else make a pretty ugly program? I'm gonna go try it again at some point tonight. How'd your approach differ from mine?
no subject
Date: 2009-11-12 12:13 am (UTC)Anybody else make a pretty ugly program? I'm gonna go try it again at some point tonight. How'd your approach differ from mine?
no subject
Date: 2009-11-12 01:30 am (UTC)no subject
Date: 2009-11-12 05:55 am (UTC)(I realized I totally got off-track and tried to get an answer the problem didn't ask for.)
pXWMiprUPTOVcxLS
Date: 2012-01-07 09:28 am (UTC)MoDeXpCzNyFKFCSvSS
Date: 2011-08-14 05:14 am (UTC)vqiwThxRBr
Date: 2012-01-09 05:19 am (UTC)