Create main.cpp

diffs from course staff's main.cpp file by adding another stdout flush to interact with the python scripts :)