- #1
- 2,386
- 4
I'm trying to create a sieve (prime sieve). A nice quick simple one using boolean expressions.
I remember on Visual Basics it began by creating like X number of boolean variables and then sieve them out by classifying them as false... and so on.
How to a create a large group of boolean variables?
I think it was something like p(i) and i=X, which X determined how many to create. It was something like this I think.
So, technically i is like a variable itselt because when I go through the loop, I should be able to go through steps like...
p(4) = false;
p(6) = false;
p(8) = false;
... all the way until I reach 2X.
So, how do you create this variable?
Thanks, I appreciate it.
I remember on Visual Basics it began by creating like X number of boolean variables and then sieve them out by classifying them as false... and so on.
How to a create a large group of boolean variables?
I think it was something like p(i) and i=X, which X determined how many to create. It was something like this I think.
So, technically i is like a variable itselt because when I go through the loop, I should be able to go through steps like...
p(4) = false;
p(6) = false;
p(8) = false;
... all the way until I reach 2X.
So, how do you create this variable?
Thanks, I appreciate it.