Preview

Machine Problem 1

Good Essays
Open Document
Open Document
293 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Machine Problem 1
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.

CODE:

/** Laboratory Exercise #1 CS10-B15

Macanas, Johanna Mari C.
*/

#include<iostream.h>

int main ()

{ float length,width,depth,perimeter,volume,surface_area; //Variable names cout<<"Enter length: "; cin>>length; //Enter length cout<<"Enter width: "; cin>>width; //Enter width cout<<"Enter depth: "; cin>>depth; //Enter depth;

perimeter=2*(length+width); volume=(length*width*depth); surface_area=perimeter*depth+length*width; //Formulas cout<<" "<<endl; //Line break cout<<"Perimeter is: "<<perimeter<<endl; cout<<"Volume is: "<<volume<<endl; cout<<"Underground Surface Area is:

You May Also Find These Documents Helpful

  • Good Essays

    Grady and Monroe are each paid a weekly salary allowance of $950. The doll shop is located in a state that requires unemployment compensation contributions of employers of one or more individuals. The company is subject to state contributions at a rate of 3.1% for wages not in excess of $8,100. Compute each of the following amounts based upon the 41st weekly payroll period for the week ending October 19, 2010:…

    • 541 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Problem 5-9

    • 3989 Words
    • 16 Pages

    45. (LO1) ATW corporation currently uses the FIFO method of accounting for its inventory for book and tax…

    • 3989 Words
    • 16 Pages
    Good Essays
  • Powerful Essays

    BRAE 340 Problem set 1

    • 2728 Words
    • 13 Pages

    4. An irrigation system applies a gross amount of 42 inches of water during the growing season. An evaluation determines that: 27 inches goes to satify crop ET; 9 inches runs off and is not collected for reuse; 3 inches passes through the root zone as deep percolation (total), of which 3 inches are beneficial leaching for salt removal; and 1 inch is ET from weeds. What is the irrigation efficiency (%)?…

    • 2728 Words
    • 13 Pages
    Powerful Essays
  • Good Essays

    A wheel barrow is used to lift a 200 lb load. The length from the wheel axle to the center of the load is 2 ft. The length from the wheel and axle to the effort is 5 ft.…

    • 856 Words
    • 4 Pages
    Good Essays
  • Good Essays

    That Crey

    • 541 Words
    • 3 Pages

    1. Farmer McDonald has 800 m of fencing and wishes to enclose a rectangular field. One side of the field is against a river and does not need fencing. Find the dimensions of the field if the fenced area is to be a maximum. A county fair has a holding area for prize sheep that are entered in a contest. The holding area is made up of 12 identical pens arranged in a two by six grid. If 100 m of fencing is available, what dimensions of each pen would maximize the total holding area? State EXACT answer. (from McGraw-Hill Ryerson Calculus & Advanced Functions Pg. 382 #12b) A piece of sheet metal 60 cm by 30 cm is to be used to make a rectangular box with an open top. Squares are to be cut from each corner of the sheet metal, the sides folded upward to form the box, and then the seams welded. Find the dimensions that will give the box with the largest volume. State EXACT answer. An enclosed can is to have a capacity of 1000 cm 3 . Find the dimensions of the can if a minimum amount of tin is to be used. The marketing department has decided that: a) its height must be at least 4 cm. b) its height must be at least 4 cm and its diameter must be at least 6 cm. Answer accurate to one decimal place. 5. An amount of $1000 is invested at 5% compounded annually. a) Write an equation for the amount of the investment, A, for t years. b) Determine the rate of change in the amount of the investment with respect to time, t. c) If the money is invested for 8 years, i) At what time is the amount a minimum? What is the minimum amount? ii) At what time is the amount a maximum? What is the maximum amount? The effectiveness of studying for an exam depends on how many hours a student studies. Some experiments show that if the effectiveness, E, is put on a scale of 0 to 10, then −t   E ( t ) = 0.5  10 + te 20  , where t is the number of hours spent studying for an examination.     If a student has up to 30 hours for studying, how many hours are needed for…

    • 541 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Bcom 275 Assignment 1.1

    • 569 Words
    • 3 Pages

    The first misunderstanding is the most recent. I am a commercial insurance agent and I was speaking to a farm owner on his farm policy. The misunderstanding happened when I was trying to explain was co-insurance is on a building. In this example, I was the sender and the farmer was the receiver.…

    • 569 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    The publication, Effect of Intake Air Filter Condition on Vehicle Fuel Economy, had some of the same findings that I have found. They found that by keeping up with maintenance tire pursier and the right lubricants can save fuel and money. They found that cars made before the 1980’s are less likely to benefit from the changes that have be discussed. The cars made after the 1980’s are more likely to benefit from the changes or the upgrades spoken about. (Oak Ridge National Laboratory, Kevin Norman, Shean Huff, Brian West 2009)…

    • 3580 Words
    • 15 Pages
    Good Essays
  • Satisfactory Essays

    Find the perimeter of the piano and also the room in expressions. Have these expressions Simplified if possible.…

    • 288 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    problem set 3

    • 386 Words
    • 2 Pages

    Problem Set 3 is to be completed by 11:59 p.m. (ET) on Monday of Module/Week 6.…

    • 386 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Don’t’ settle for your first instinct when problem-solving. Think of all the possibilities for solving a problem. Once you have come up with a creative approach, you need to use your critical thinking skills to evaluate which option is the best one to solve the problem.…

    • 293 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    COM 100 Exam 1

    • 1961 Words
    • 9 Pages

    You will have 60 minutes to complete the exam from the time it is distributed. You will have ample time to read each test item carefully and respond to each test item thoughtfully. Test items are not intended to be tricky, but rather to assess the depth of your understanding.…

    • 1961 Words
    • 9 Pages
    Powerful Essays
  • Satisfactory Essays

    It is not uncommon for people to say that relationships are based upon trust. Although love alone plays a major role in a successful relationship, obstacles found within trust boundaries are often tested and played out. It is equally important to express your self-disclosure as it is to receive your partners. Communication can either make or break a relationship depending on how far one is willing to trust the other. After reading “Can We Talk? Researcher Talks About the Role of Communications in Happy Marriages” and reviewing on my own personal relationship status, I am in conclusion that good communication between interpersonal relations are key to a successful relationship/marriage.…

    • 575 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Problem Set 3

    • 294 Words
    • 2 Pages

    Problem Set 3 is to be completed by 11:59 p.m. (ET) on Monday of Module/Week 6.…

    • 294 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    NVQ Level 3 Task B

    • 446 Words
    • 2 Pages

    It is vital that diversity, equality, inclusion and discrimination is understood and adhered to at all times as a social care worker.…

    • 446 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Problem Set 3

    • 706 Words
    • 4 Pages

    Problem Set 3 is to be completed by 11:59 p.m. (ET) on Monday of Module/Week 6.…

    • 706 Words
    • 4 Pages
    Satisfactory Essays

Related Topics