Create invert.cpp

Inverts words