Question: Practice: Two-dimensional arrays Design an algorithm that takes two locations from the user and outputs the correct points, as shown in the table above. For

Practice: Two-dimensional arrays
Design an algorithm that takes two locations from the user and outputs the correct points, as shown in the table above. For this problem you only need to output what is on the white lines of the table.
- You must declare the 2D array and give it a suitable name, but for initialization you can simply write input mySuitablyNamedArray from points table.
- The user enters the two locations as numbers, for example 0 would refer to Main, US, Alaksa, Canada, 1 would refer to Hawaii, etc.
- If points are not applicable for a pair of locations, output "NA" to the user. For this part, think of how will you handle the "-" in the table above that means not applicable. What value might best represent this in the 2D array? Recall our Sentinel Value discussion in Week 4.
This is worth 10 points.
Europe South Amaricn 1 125 7.5 625 Central Amenta South Amenca 1 25 h Amenia 2 12.5 dde Eazt
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
