• Post Reply Bookmark Topic Watch Topic
  • New Topic

Need Help Prime Program  RSS feed

 
Khaly Silverman
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Program to pull prime numbers between two entered values,
I've changed this up so much that I'm not even able to make sense of my work any more,



Please help this is due in 1 hour.....

 
Steve Fahlbusch
Bartender
Posts: 612
7
Mac OS X Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings and Welcome,

sorry to say this but you need to take a steep back and understand how to figure out what a prime number is (sorry dangling participle).

before you write code, write down (in English or your native language) the steps to determine a prime number, then write your code.

-steve
 
Junilu Lacar
Sheriff
Posts: 11494
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Khaly, were you not given instructions on how to determine a prime number? There are quite a few algorithms but you usually start with the Sieve of Eratosthenes
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!