A more difficult app dealing with arrays and random numbers