find value in long table.

I would like to have a arduino find the value assigned to a decimal number in a table.
P.S this is not in any order or increment.

For example
100 = 5000
200 = 7500
300 = 11000



Please explain in more detail.
what is that?

struct Entry {
    int key;
    int data; 
} table[] = {{100,5000}, {200,7500},{300,11000}};

int FindInTable(int key) {
   for (int index = 0;  index < sizeof table / sizeof table[0]; index++)
       if (table[index].key == key)
          return table[index].data;
    return -1;

+1 for john

if the table is large, sorting the table can improve the search as binary search or skip search can be used.

Do you have performance requirements?

If you don't want to sort your table, you can also use a hash table.