Sieve of Eratosthenes is used to find all prime numbers below certain limit Lets call this limit $n$\\
It starts with number 2, which is the first prime number and marks all multiplies of this number (up to predefined limit) as composite (not prime), those numbers will be later ignored \\
First we define the limit, we name this limit as $num$ which will decide how many numbers we will check, either by user interface or we hard code it in \\
We define boolean list which will be used to distinguish between prime and composite numbers \\
We start with number 2 and assign it to variable named $p$\\
Then we calculate the primes using Sieve of Eratosthenes using nested while loops \\
External loop goes through numbers smaller than $\sqrt(num)$, starting with current value of $p$\\
It checks if the number we are currently was checked out by checking the value of boolean table \\
if it was not checked out it gets a new number which is the $p$ multiplied by 2, then it goes into inner loop \\
inner loop sets all multiplicities of $p$ as crossed out by setting their value in boolean table to false \\
then we increment the $p$ and the whole loop repeats until we run out of numbers \\
we return array of prime numbers to function which prints those numbers