Chapter Example: Reverses a series of numbers using a variable-length array