The problem: a traveling salesman wants to visit all cities of a given together, and route distances between the various cities are known. Consider now the problem, starting and ending in a given city, determining the route to be taken by the traveling salesman who, once passing through the remaining cities, minimizes the total distance to be traveled. This problem will be developed using the neighbor's heuristic closest to go by choosing how next city to visit that that, among the cities not yet visited, is closest to the city where you are. This heuristic can be used in the traveling salesman problem. last city visited to the city of origin. The project consists of developing a menu application that allows the any user to use the resolution of this problem.
One of the menu options is' Show Affections' and for that we have to perform a function called 'prints? to show in the command window the allocations with their costs and the total cost. What is shown should respect this format: