The program below is your first step into dealing with tables. Suppose that
you have the table below, which shows the various diameters of a rod of material X
and the load carrying capacity corresponding to each diameter.
Diameter (mm)
10
12
15
18
20
22
25
Max. load (Kg)
420
540
658
860
1050
1230
1400
Now, our C program recalls data from this table. The data in
the table will be stored in arrays. The user can enter a diameter value and
request a load value, or a load value to get a suitable diameter value.
To download the source file, simply click here.