Example 7.9 Calculate freight charges
Design an algorithm that will read an input weight for a item to be shipped., search an array of shipping weights and retrieve a corresponding freight charge. In this algorithm, two paired arrays, each containing six elements, have been established and initialized. The array 'shipping_weights' contains a range of shipping weights in grams, and the array 'freight_charges' contains the corresponding array of freight charges in dollars, as follows:
My question is this for shipping weights it has values
1-100
101-500
501-1000
1001-3000
3001-5000
5001-9999
How am I suppose to store these numbers in an array?
Or what am I suppose to store in the shipping weights array?
I just can't figure out what to do?
This problem isn't for class I just working on my own I have been in college in the past but I'm not now. this problem is from simple program design book