Suppose that you work for a beverage company. The company wants to know the optimal cost for a cylindrical container that holds a specified volume. Write a program will ask the user to input the volume and radius of the cylinder . Then the program will call a function to compute and return to main the height and cost of the cylindrical container . (Use call by reference syntax for the function call). At the end the program should output the height of the cylinder, and the cost of the cylindrical container . Use the following formulas, where V is the volume, R is the radius, H is the height, and C is the cost of the cylindrical container. H =V / (PI * R2) C = 2*PI*R*(R + H) Note: PI=3.14159 Please solve this question in C++ language quickly
Suppose that you work for a beverage company. The company wants to know the optimal cost for a cylindrical container that holds a specified volume. Write a program will ask the user to input the volume and radius of the cylinder . Then the program will call a function to compute and return to main the height and cost of the cylindrical container . (Use call by reference syntax for the function call). At the end the program should output the height of the cylinder, and the cost of the cylindrical container . Use the following formulas, where V is the volume, R is the radius, H is the height, and C is the cost of the cylindrical container. H =V / (PI * R2) C = 2*PI*R*(R + H) Note: PI=3.14159 Please solve this question in C++ language quickly
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 1PP
Related questions
Question
Suppose that you work for a beverage company. The company wants to know the optimal cost for a cylindrical container that holds a specified volume. Write a program will ask the user to input the volume and radius of the cylinder . Then the program will call a function to compute and return to main the height and cost of the cylindrical container . (Use call by reference syntax for the function call).
At the end the program should output the height of the cylinder, and the cost of the cylindrical container .
Use the following formulas, where V is the volume, R is the radius, H is the height, and C is the cost of the cylindrical container.
H =V / (PI * R2)
C = 2*PI*R*(R + H)
Note: PI=3.14159
Please solve this question in C++ language quickly
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr