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 \\
\caption{Sieve of erastosthenes example for numbers up to 120, prime numbers on the right, darker colors show prime numbers, lighter colors show numbers which were checked while checking whether given number was prime \href{https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes}{SOURCE}}
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
\subsection{Description of designed code structure}
There are three code blocks, sieve\_of\_eratosthenes, print\_sieve and main function executed at the beginning, main functions gets no arguments and outputs string consisting of prime numbers, print\_sieve function receives number which describes how many numbers should be checked in the sieve, similarly sieve\_of\_erastosthenes takes this number as an argument, and returns list of all prime numbers found by the sieve.
We did three types of tests, positive tests which inputted prime numbers into the sieve and checked if the sieve correctly validated them as prime, negative tests which inputted composite numbers into the sieve and checked if the sieve correctly determined them to not be prime. \\