Amazing Little Ecosystem (
winterthunder
) wrote
in
intro_to_cs
2010-01-16 10:33 pm (UTC)
no subject
Thank you for posting this. :) I was trying to do something with the sieve of Eratosthenes, and it wasn't working in a pretty spectacular fashion.
Reading through this, I'm following you up until this line: remaindercheck = remaindercheck * candidate%i
If I've understood correctly, this is the line that divides the number by all the numbers less than it, right? How exactly is it doing that?
(
14 comments
)
Post a comment in response:
From:
Anonymous
This community only allows commenting by members. You may comment here if you're a member of intro_to_cs.
OpenID
(will be screened if not on Access List)
Identity URL:
Log in?
Dreamwidth account
(will be screened if not on Access List)
Account name
Password
Log in?
If you don't have an account you can
create one now
.
Subject
HTML doesn't work in the subject.
Formatting type
Casual HTML
Markdown
Raw HTML
Rich Text Editor
Message
[
Home
|
Post Entry
|
Log in
|
Search
|
Browse Options
|
Site Map
]
no subject
Reading through this, I'm following you up until this line: remaindercheck = remaindercheck * candidate%i
If I've understood correctly, this is the line that divides the number by all the numbers less than it, right? How exactly is it doing that?