Create main.cpp

Here is the code, ugly devil it is.