Gapplet

We perform Eratosthenes' sieve. For a given positive integer n, the list [1, ..., n] is written down, and, at each step, proper multiples of a given number in the list are removed from the list. The final result is the list of primes less than or equal to n.

Input a positive integer n
e.g., 300.
</COMMENT>
 
Start writing down the list. 
</COMMENT>
 
</COMMENT>
 
 
 
Perform a sieving step. 
</COMMENT>
 
</COMMENT>