I got a .txt file wich i load into a string with Buffered string reader. The data in the String is in this format.
20 000 5 000
50 000 6 000
60 000 7 000
80 000 8 000
90 000 9 000
I need to go trough these numbers and find the right one. I have a int variable with a number. Lets say the int variable is "24000". Then the right answer from the list would be 20 000. As this is the closest match. I Then need to extract the number after 20 000 (5 000) and write it to a separate int. I cannot change the format of the numbers, because there are like a million of them formated in a .txt file like this.
Summary : UserNumber -> Find closest match from the left side -> Store right side number to an int. Any ideas on how i can manage this?