The code just counts the number of prime numbers up to n.
-
gcc (or any other c++ compiler)
-
cmake
-
make
sudo apt install make cmake build-essential -y
$ mkdir build
$ cd build
$ cmake ../
$ make
Run the executable in the bin
folderand specify up to what term you wanna calculate
./primeT.o number
or ./primeN.o number