I've come up with 5 different formulae to work out each child's weight.
First off you organise the inputs into an ordered list in an array, then put them into the following formulas. The 5 children are labelled a to e and for the sake of ease of reading the array starts at 1, being the lowest valued input and ends at 10 being the highest.
a = (1 + 2 - 3) / 2
b = (1 + 3 - 2) / 2
c = (2 + 3 - 1) / 2
d = (4 + 6 - 1) / 2
e = (5 + 7 - 1) / 2
EDIT: I've just realised that these formulae only work for the first set of test data, guess I should have checked that first, now I'm really stuck...
However I am far from satisfied with this answer and I'm thinking that there must be better and more general equation so I don't have to have 5. How can I tackle this?
This post has been edited by jamal antonio: 16 March 2013 - 04:14 PM