Problem:
A salesman travels from one to another state. he may visit either n=2,3,4,5 or 6 cities of punjab.
For every number of cities he may adopt different routes.
Some routes will be longer and other rwill be shorter.
We neeed to design a C++ Program.
*TO DISPLAY EACH ROUTE FOR PARTICULAR NUMBER OF CITIES "n".
*TO DISPLAY SHORTEST AND LONGEST ROUTE
Hint:
1:Develop a menu using switch
2: Enter the distance using two dimentional array.

i have made the switch menu but dont know what to do next...
there is also an exe.file attached.. provided by our teacher as hint.. help me out!ty..

Recommended Answers

All 2 Replies

Please do your own homework. We'll help you work through specific problems in your code or understanding of the question, but won't do the work for you.

Member Avatar for ArashVenus

I'm not going to write the code for you , but Im going to give you some tips .
1-First step is to take a paper , and model It , I would actually paint a person , and I would model the cities and routes ,
2-Second step is to think about It and solve It , you could also write down what you doing to solve It .
3-Third part is simple , you learned a little bit about c++ in your school , and all you got to do is to make a program from the algorithm you written in second step .
4-Fourth step is : If you tried to program and failed at some point , you could write your algorithm or the code you written here & ask for some help , everybody would love to help you .

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.