can anyone tell me what an algorithm for the following situation would look like?
i need to make a program in which the user enters a city name and x and y coordinates. depending on how many cities are entered, a recursion algorithm is used to determine the distance between the cities.
like the following:
if the user enters 3 cities and their coordinates:
chicago x = 300 y = 500
miami x = 100 y = 100
toledo x = 10 y = 10
then the program takes the x and y values to find the distance between the cities so the out put would look like:
chicago to miami = 500 miles
miami to toledo = 180 miles
total miles = 680 miles
thank you in advance
Daren
Bookmarks