jeffshaffer
01-19-2007, 02:58 PM
I have two problems one is this code
//Enter input data
cout << "Please Enter Length of Pool: ";
cin >> length;
cout << "Please Enter Width of Pool: ";
cin >> width;
cout << "Please Enter Depth of Pool: ";
cin >> depth;
//Calculate the cubic feet of water in swimming pool
water = length * width * depth
//Display the results of calculation,
cout << "A swimming pool with a length of " << length " a width of " << width " and a depth of " << depth " will contain " << water " cubic feet of water" << endl;
and my other problem is: I need to write a program that displays a number, its square, and its cube from 5 to 20. NOT sure how to begin to write that, Im not supposed to use alot of cout statements either im supposed to use a looop i beleive.
//Enter input data
cout << "Please Enter Length of Pool: ";
cin >> length;
cout << "Please Enter Width of Pool: ";
cin >> width;
cout << "Please Enter Depth of Pool: ";
cin >> depth;
//Calculate the cubic feet of water in swimming pool
water = length * width * depth
//Display the results of calculation,
cout << "A swimming pool with a length of " << length " a width of " << width " and a depth of " << depth " will contain " << water " cubic feet of water" << endl;
and my other problem is: I need to write a program that displays a number, its square, and its cube from 5 to 20. NOT sure how to begin to write that, Im not supposed to use alot of cout statements either im supposed to use a looop i beleive.