Multi-Dimensional Arrays question. unsure how to set srcCode
Author |
Message |
xdynasty
|
Posted: Sun Apr 04, 2004 7:34 pm Post subject: Multi-Dimensional Arrays question. unsure how to set srcCode |
|
|
Highway maps often contain tables showing distances between various cities. A table showing
distances between cities 1, 2, and 3 might take the following form, which indicates, for example,
that the distance between 1 and 3 is 240 km.
1 -
2 240 -
3 120 165 -
1 2 3
Write a program that reads number pairs (over the range 1 to 8) and the distance in kilometers
between that pair of cities. Your program should produce a distance table like the one shown in
the preceding example.
Your program should not attempt to check for invalid data but it should be able to accept the
pairs of number codes in either order. For example, input of either 12 240 or
21 240 should both be acceptable. Your program should not expect values of all inter-city
distances to be available to it. If an entry is missing, a question mark should be printed in the
appropriate location in the table.
help with this question would be greatly appreciated. its not for any tests or anything, its a question my teacher gave us to try. realy not to sure what she means.
thanks
ps. the numbers of 123 are below the second and third coloumn. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Delos
|
|
|
|
|
|
|