A power station is on one side of a river that is one- half mile wide , and a fa
ID: 3568429 • Letter: A
Question
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. it costs $ 7 per foot to run power lines over land 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 it should 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 is
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.
the width of the river is 1/2 a mile and the the distance of the factory downstream on the other side of the river is 8 miles. You need to convert miles to feet.
You have to take into account that when you enter the input you are entering 1/2 mile and 8 miles. And it is $ 7 per foot to run power lines over land and $ 9 per foot to run them under water. You are having to enter $7 per foot and $9 per foot.
Explanation / Answer
#include using namespace std; void conversionFunc(double& dFactory, double& wRiver); double costFunc(double, double); int main() { double wRiver; double dFactory; double cUnderWater; double cOverLand; cout > wRiver; coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.