Create main.cpp

This is the final version of the program please let me know if there are any bugs.