Problem

(The Power Station Problem) A power station is on one side of a river that is one-half m...

(The Power Station Problem) A power station is on one side of a river that is one-half mile wide, and a factory is eight miles downstream on the other side of the river (see Figure 7-21). It costs $7 per foot to run power lines overland and $9 per foot to run them under water. Your objective is to determine the most economical path to lay the power line. That is, determine how long the power line should run under water and how long should it run over land, to achieve the minimum total cost of laying the power line.

Write a program that prompts the user to enter:

a. The width of the river

b. The distance of the factory downstream on the other side of the river

c. The cost of laying the power line under water

d. The cost of laying the power line over land

The program then outputs the length of the power line that should run under water and the length that should run over land, so the cost of constructing the power line is at the minimum. The program should also output the total cost of constructing the power line.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 7
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT