Data structure for a quantity to price multiplier table Yesterday at work I came across an interesting problem that I wasn't able to figure how to structure properly. I'm relatively new to the field and was wondering if I could get some help around here.
What i have here is a table like this:

          |1-2| 3-5 | 6+ | ($)
          ________________
          |              |
10 - 100  | x9   x6   x4 |
          |              |
100 - 2000| x5   x3   x2 |
          |______________|


Where the columns shows the base price and the row shows the quantity.
The idea here is that the bigger quantity you buy, the better the price. Not only that but we would also reduce the multiplier to items with bigger base price, because otherwise the price could become too high too quickly.



The outcome I want to achieve is when given two variables - base price and quantity to find where I'm standing in the table. This means for each table entry I need two ranges. 

Let me give some examples:


Base price: 1.5$
Quantity: 200
Result: x5 (multiplier)


So the actual price will be 7.5$


Base price: 10$
Quantity: 15
Result: x4


So the actual price will be 40$



How would you remember the data and how would you write something flexible and scalable so one is able to add and remove table rows easily?

I would evaluate the answers based on how clean the solution is. And by clean I mean easy to use and easy to implement. Currently in our system this table is made from 20 if statements so anything would be better I think!
It's hard to see anything beating the obvious implementation with arrays. You have an array whose columns are indexed by price bands and whose rows are indexed by quantity bands. Store that as a 2D array. Use a pair of 1D arrays to store the minimum value in each price and quantity band. To look up a value, just use linear search through the bands.  Binary search would be faster if the array is huge but it's probably not necessary for small arrays (and your "20 if-statements" suggests the array is very small).

Load the data from a file so you can easily rebuild the data structure if you change your discounting schemes. I'm assuming this is a relatively rare event and, with a small table, it takes no time anyway.