Command line interface to compute & print the Collatz conjecture.
- UNIX-like operating system
- Superuser privileges
- Git
- GCC
- GNU C Library
- GNU/Make
- Man
$ git clone https://github.com/aminnairi/collatz.git
$ cd collatz
$ make # for the lazy ones
$ make compile # alternative
$ make install
Note: this will copy the program to the
/usr/local/bin
folder as well as copying the man page to the/usr/local/man/man1
folder, requiring superuser access.
$ collatz 15
15 46 23 70 35 106 53 160 80 40 20 10 5 16 8 4 2 1
$ collatz 5
5 16 8 4 2 1
collatz
only accepts one integer number greater or equal to one.
$ man collatz
$ make uninstall
Note: this will remove the copy of the program from the
/usr/local/bin
folder as well as removing the man page from the/usr/local/man/man1
folder, requiring superuser access.
$ make clean
This will remove the objects
folder.
$ make mrproper
This will remove the objects
& binaries
folder.
$ vim makefile
COMPILER=gcc
$ vim makefile
COMPILER_FLAGS=-Wall -Wextra -Wpedantic -O3 -std=c18
$ vim makefile
LINKER=gcc
$ vim makefile
LINKER_FLAGS=