Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The manager of Fish Haven wants a program that displays the number of gallons of water a rectangular aquarium holds, given the aquariums length, width,

The manager of Fish Haven wants a program that displays the number of gallons of water a rectangular aquarium holds, given the aquariums length, width, and height measurements in inches. (Hint: There are 231 cubic inches in a gallon.)a. Using the chart shown earlier in Figure 4-12 as a guide, enter the input, processing, and output items, as well as the algorithm, in the first column. b. Desk-check the algorithm twice. For the first desk-check, use 20.5, 10.5, and 12.5 as the length, width, and height measurements. For the second desk-check, use 30, 9, and 14. c. Enter the C++ instructions in the second column of the chart, and then desk-check the program using the same data used to desk-check the algorithm.d. If necessary, create a new project named Introductory12 Project, and save it in the Cpp8\Chap04 folder. Enter your C++ instructions into a source file named Introductory12.cpp. Also enter appropriate comments and any additional instructions required by the compiler. Test the program using the same data used to desk-check the program.

Can't figure out what is wrong in my code and can you do an IPO as well

#include using namespace std;

int main() {

double length, width, height, volume, gallons; cout << "Enter length:"; cin >> length; cout << "Enter width:"; cin >> width; cout << "Enter height:"; cin >> height;

volume = length*width*height;//cubic inches gallons = volume/231;//gallons

cout<<"Rectangular aquarium holds"<< gallons<< "Gallons of water"; return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions