Actually you only need to go to the square root of 50,000 so I think 224 (so that's where they 223 came from)
That came out as p2 but it's actually p squared.
Type: Posts; User: Faz
Actually you only need to go to the square root of 50,000 so I think 224 (so that's where they 223 came from)
That came out as p2 but it's actually p squared.
That would be a simple but not foolproof way of doing it. If you went through and set all mulitples of 2, 3,5,7,9,11 and 13 you would get most primes but there would be some missing.(EDIT: sorry I...
I don't think that would make a difference. Norm is right the logic you are using to check if a number is prime is flawed I just ran a similar logic in VBA in excel to show this.
9000
9006
9009...
Could you give us more detail say give a sample of what you expect to happen for example what you expect the output to be if you set the boundries to 2 and 50 and what output you actually get. Also...