Question
Finding the number and the index of the biggest number in an array thats less than X
Can anyone help me?
I've got an array of 10 accending numbers that go from from 1 to 3000. I want to find what the biggest number thats less than or equal to 2000. e.g. if the array was 1,10,27,200,422,1500,1999,2500,2950, 3000 I would want the number 1999 and its index (6).
Thanks

