a salesman travel from sindth to punjab province. He may visit either n=2,3,4,5 or 6 cities of punjab. For every number of cities n he may adopt different roots.
Some roots will be longer and other shorter. Develop a Cpp program.

Cheating on your howmework will do you no good. Why not write the program yourself? Do the math with pencil & paper first so that you know how to solve the problem.

The line between 'helping you finish a project' and 'helping you cheat' is a fine one, at times. However, in this case the Daniweb rules are pretty straightforward:

Do provide evidence of having done some work yourself if posting questions from school or work assignments

So: Show us what you have done so far, and tell us what you are having difficulty with, and we will assist you. We will not, and cannot, provide you a solution without you showing some effort on your part.

BTW, you should know that the Travelling Salesman Problem is a classic one, with many variations, and is provably NP-complete (meaning that all the known general solutions require non-deterministic polynomial time; any solution in less than exponential time would effectively be a proof that NP = P, which is an open question to date and thought by many to be undecidable). Just so you know.

Comments
haha great (Y)

okay okay :(
i've made da program from da beginning nd da prolem is all coming in cases.
When m doin' it with switch statement, i got problem in loops of it. Better solve da 1st two. Rest i'll do!!!

Please write in full English words -- this isn't a chatroom. There are a lot of non-native English speaking people here who have no idea what you just wrote. Finally, not much point posting an executable -- most people won't bother to intall it on their computer for fear that it may contain virus or malware.

Edited 2 Years Ago by Ancient Dragon

thnx foh helping!!!
I'll not rather waste my furthur time on u ppl other than doing it myself!

Out of the rubbish you wrote I'm luckily able to infer, that indeed we did provide you with a lot of help.
So get on with it. Any procrastination on your part will just cause more trouble. Success!

Edited 2 Years Ago by ddanbe: correction

other than doing it myself!

Yes, that's what we want you to do, then ask questions about what you don't understand. We're not going to write the program for you, but help you to write it yourself. Give a man a fish and he will eat for one meal, teach a man how to fish and he will eat for life.

Comments
The proverb!
agree (Y) :D

then dude tell me next!
i've told here that m getting problem in loop!

This question has already been answered. Start a new discussion instead.