I am trying to convert a simple program for looking though the first 1000 numbers and counting how many primes are there. though right now I can’t even get nested for loops working. The error is on the NEXT statement, it says there is a Syntax Error.
Here is my code
≪ 1000 →n 2 →c 0 →q
0 →v
3 n FOR j
3 → j
≪
2 q FOR i
2 → i
i SQ
NEXT
≫
2 STEP
≫
I don’t know what i’m expecting from this program, i’m just trying to get nested for loops with the same ranges and incrementing behaviors as what i would use in my program. though for this I would expect it to put i squared (as in the value of the counter i to the power of 2) in the stack repeatedly.