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.

Recommended Answers

All 14 Replies

Can you show your code?

i don't have code but a EXE file

i need da source code of it!!

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.

its not cheating dude!
it's just d help :)

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.

commented: haha great (Y) +0

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!!!

here is da EXE file!!!

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.

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!

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.

commented: agree (Y) :D +0
commented: The proverb! +14

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

You need to post code becuse my eyesight is not good enough to see your computer's monitor from where I am sitting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.