A community for students.
Here's the question you clicked on:
 0 viewing
anonymous
 one year ago
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
anonymous
 one year ago
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

This Question is Closed

anonymous
 one year ago
Best ResponseYou've already chosen the best response.0you can use the sieve of eratosthenes or however his name is spelled/spelt

appleduardo
 one year ago
Best ResponseYou've already chosen the best response.0https://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
 one year ago
Best ResponseYou've already chosen the best response.0ubah, what did you come up with? This is not an answer site. It is a help site.

anonymous
 one year ago
Best ResponseYou've already chosen the best response.0You could try using nested for loops. The first counting from 1100, the second also counting from 1100 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.
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.