A few simple Questions
Posted on 2004-11-12
I need a few basic questions answered, so i may as well just put them all together.
1) Is there an easy way to set the content of variables p0 - p100 to "" rather than a long list?
2) i am currently using the following :
Do While N Mod X(0) = 0
N = N / X(0)
p0 = X(0)
Loop Until N Mod X(0) <> 0
Do While N Mod X(1) = 0
N = N / X(1)
p1 = X(1)
Loop Until N Mod X(1) <> 0
Is there a loop that will do this for p0 to p100 rather than a long list?
3 and last) Is there a function to put all primes into an array of X (at the minute i have X = Array(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41) but this could go up to 10's of thousands.... and i havnt got that much time) the X(0), X(1) in question 2 refers to this, so they need to be compatible as such.
Please post if you want any more info, lots of points going here on simple questions!