our task is to determine how the computers should be connected into such a chain to minimize the total amount of cable needed. there are 20 terminals each has a corresponding coordinate(x,y). the user will just choose which terminal he will put his pc's.

1. you wil ask the user first if how many pc's he will use (should be less than or equal to 20)

2. enter the terminal number he will use (1-20)

3. calculate minimum path for cabling

we just studied basic C++ for only 10 days and im running out of ideas how will you solve this.. i only know cin,cout, if else,for loop,do while loop,while loop, basic array (really basic), switch .....

please help me. sumbody told me to use permutation and sort but i dont know how. please help.......