Create maxcontiguous.cpp

Second question in the homework