Update array.cpp

j-- changed to i--