anonymous
  • anonymous
can anybody write the algorithm to display all the prime numbers between 1 and 100. Try to formulate a model for picking out the prime numbers from this range and describe the input,processing and the output intended
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
you can use the sieve of eratosthenes or however his name is spelled/spelt
appleduardo
  • appleduardo
https://www.youtube.com/watch?v=wU5taAR5sPM take a look at this code, doesnt matter if you dont speak/understand spanish, if you know the basics on programming, youll get it very quick. If u have any doubts tag me
e.mccormick
  • e.mccormick
ubah, what did you come up with? This is not an answer site. It is a help site.

Looking for something else?

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

More answers

anonymous
  • anonymous
You could try using nested for loops. The first counting from 1-100, the second also counting from 1-100 then checking if first count has remainder 0 when divided by second, if it does then remove it from range(100). You'll be left with all the prime numbers. Since you're only running it to 100 the speed is irrelevant.

Looking for something else?

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