Update prob02.cpp

Corrected a bug about the length of int array.