Loops/Increment loop index within loop body: Difference between revisions
Content added Content deleted
m (updated the task's requirements to be a more clearer/accurate (courtesy N. G.).) |
|||
Line 19: | Line 19: | ||
::* (at iteration time) increments the index by unity |
::* (at iteration time) increments the index by unity |
||
::* if the index is prime: |
::* if the index is prime: |
||
::::* displays the |
::::* displays the count of primes found (so far) and the prime (to the terminal) |
||
::::* increments the index such that the new index is now that prime |
::::* increments the index such that the new index is now the (old) index plus that prime |
||
::* terminates the loop when '''42''' primes are shown |
::* terminates the loop when '''42''' primes are shown |
||