Problem Solving with C++ (9th Edition)
Problem Solving with C++ (9th Edition)
9th Edition
ISBN: 9780133591743
Author: Walter Savitch
Publisher: PEARSON
Question
Book Icon
Chapter 2, Problem 12PP
Program Plan Intro

Water well

Program Plan:

  • Include required header files.
  • Define main function.
    • Initializes the values of gallons per cubic foot to “7.48” using “const” modifier.
    • Initializes the value of pi to “3.1415” using “const” modifier.
    • Declare “int” variable for radius.
    • Declare “double” variables for radius feet, depth, volume of well and gallons value.
    • Create the prompt statement for radius and depth of well.
    • Read the value of radius and depth from user.
    • Convert the radius in inches to feet using “radius / 12.0”.
    • Compute the volume of well in cubic feet using “(PI * radius_Feet * radius_Feet) * depthValue”.
    • Convert the volume of well to gallons of water using “volume * GALLONS_PER_CUBIC_FOOT”.
    • Final display the gallons of water for given well holds.

Blurred answer
Students have asked these similar questions
Implementation of an Integrated Inventory Management System at Green Fields Manufacturing” Green Fields Manufacturing is a mid-sized company specialising in eco-friendly home and garden products. In recent years, growing demand has exposed the limitations of their fragmented processes and outdated systems. Different departments manage production schedules, raw material requirements, and finished goods inventory using a patchwork of spreadsheets and older software tools. These silos create inconsistent data, errors in stock levels, delivery delays, and customer dissatisfaction.  Green Fields plans to implement an Integrated Inventory Management System to centralise production, procurement, inventory, and sales data to address these challenges. This technology aims to provide real-time visibility into stock levels, automate reorder points, and generate analytical dashboards for managers at both operational and strategic levels. Ultimately, the new system will streamline workflows, reduce…
. Differentiate between continuous and discrete systems. How does their nature affect the selection of simulation techniques?
hi, I need help to resolve the case, thank you
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Text book image
Principles of Information Systems (MindTap Course...
Computer Science
ISBN:9781285867168
Author:Ralph Stair, George Reynolds
Publisher:Cengage Learning
Text book image
A+ Guide To It Technical Support
Computer Science
ISBN:9780357108291
Author:ANDREWS, Jean.
Publisher:Cengage,
Text book image
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning