Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 15/22:00:07 < utopia_> hey im trying to generate a list of prime numbers til MAX to help me learn C++, but im encountering problems
- 15/22:00:38 < utopia_> at the moment, it divides every number by 2 to find out if it is prime or not, but this is flawed
- 15/22:00:44 < utopia_> any help would be appreciated :)
- 15/22:01:01 < utopia_> i cant see the solution really
- 15/22:01:24 < CaptainMatt> utopia_, do you know what a prime number is?
- 15/22:01:43 < utopia_> CaptainMatt, a number that can be divided by 1 and itself from my understanding
- 15/22:06:49 < lilltiger> utopia_: there is no easy way to figure out if a number is prime or not
- 15/22:07:15 < utopia_> lilltiger, no kidding, ive been at this for the last hour heh
- 15/22:07:22 < utopia_> so far, ive got it working < 5
- 15/22:07:27 < utopia_> but at 10 it slips up
Add Comment
Please, Sign In to add comment