Q24 from the Yr 11 Independent Schools Yearly exam of 2013

This code is yet to be finalised - currently it has the same error as the question.

Enter the numbers you want for myFunction (separate with commas):




MyAlgorithm gives this:

The array is here:

The sum of the array numbers is:

There are 2 other versions:
Average with the same error as the Question
In this version, the digits concatenate