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
icon
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
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Concept of Parenthesis
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr