Question: Please answer using C++ Write a program that calculates how many gallons of water are in a rectangular swimming pool. Your program should ask the

Please answer using C++
 Please answer using C++ Write a program that calculates how many

Write a program that calculates how many gallons of water are in a rectangular swimming pool. Your program should ask the user for the dimensions of the pool, in feet (length, width, depth). Each of these values should be stored in a data variable. The user does not need to enter whole numbers. Next, your program calculates how many gallons of water are in the pool. Do this by first calculating how many cubic inches of water (length height depth, in inches). There are 231 cubic inches in one gallon. Your program should then print out the result. Sample output is provided below (data typed by user is in bold). Note, I have run my program three times to get these three printouts... Please enter the length of the pool (ft): 21 Please enter the width of the pool (t) 12 > Please enter the depth of the pool (Et): 4.5 Your swimming pool contains approximately 8482.91 gallons Please enter the length of the pool (ft): 15 Please enter the width of the pool (t) 15 > Please enter the depth of the pool (ft): 10 Your swimming pool contains approximately 16831.17 gallons Please enter the length of the pool (fc): > Please enter the width of the pool (ft): 3 Please enter the depth of the pool (t) 0.5 Your swimming pool contains approximately 33.66 gallons Your program output should appear exactly as shown above. Pay attention to detail: notice how the user's input is all lined up, and the output is printed to 2 decimal places

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!