What I'm looking to do is take an array of numbers which progressively get bigger determine the highest one I can round down to. I'm not sure if that makes sense, I will give an example. Keep in mind I am making the numbers more simple for the sake of explanation, removing the last digit wouldn't work. The array I am using has 100 numbers going into the millions.
int[] breakpoint = new int[] {0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100,
110, 120, 130, 140, 150, 160, 170, 180, 190, 200};
int totalValue = 153;
int valueDisplayed;
//???
label.Text = valueDisplayed.toString();
So what I would want in this situation is to return a value of 15(the index of the item in the array), so I can then display that value (for example with a label). Surely there's got to be an easy way to do this? I could not find an answer anywhere.