+ 1
I need to find the closest (and minor) number to the average in the given numbers. For example: If the given numbers are 1,2,3,
,3,4,5 the average will be 3, and the closest numbers are 2 and 4 but the minor is 2 so the result should be 2. Or, if the given numbers are 1, 325, 350, 299 the average will be 243.75 so the closest number is 299.
1 Odpowiedź