Update Prob1.cpp

Added a if statement, so that if the initial array size is passed then it will increase array size.