Create answer.cpp

running code
http://ideone.com/l5uTPI