Machine Problem 1

Topics: Volume, Length, Calculation Pages: 2 (293 words) Published: July 31, 2013
Problem Statement: The perimeter, approximate surface area, and the approximate volume of an in ground pool is given by the following formula:

Perimeter = 2 ( length+width )
Volume = length * width * average depth
Underground surface area = 2 ( length + width ) average depth + length * width

Using these formula as basis, write a program that accepts the length, width and average depth measurements, and then calculates the perimeter, volume and underground surface area of the pool. In writing your program, make the following two calculations immediately after the input data has been entered: length*width and length + width. The results of these two calculations should then be used, as appropriate, l n the assignments statements for determining the perimeter, volume, and underground surface area without recalculation them for each equation. Verify the results of your program by doing a hand calculation using the following test data: length equals 25 feet, width equals 15 feet, and average depth equals 5.5 feet. When you have verified that your program is working, use it to complete the following table.


Laboratory Exercise #1

Macanas, Johanna Mari C.


int main ()

float length,width,depth,perimeter,volume,surface_area;
//Variable names

cout<<"Enter length: ";
//Enter length

cout<<"Enter width: ";
//Enter width

cout<<"Enter depth: ";
//Enter depth;


cout<<" "<<endl;
//Line break
cout<<"Perimeter is: "<<perimeter<<endl; cout<<"Volume is: "<<volume<<endl;
cout<<"Underground Surface Area is:...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Problem 1 Essay
  • Problem 1 Essay
  • Essay about Machine Problem Visual Basic
  • Electrical Machine 1 Essay
  • Unit 1 Problem set 1 Essay
  • Unit 1 Problem Set 1 Essay
  • Unit 1 Problem Set 1 Essay
  • eonomics problem set 1 Essay

Become a StudyMode Member

Sign Up - It's Free