CS 151: Lab 1 problems Probem 1: Write a program to input the length, width and depth of a rectangular swimming pool and calculate the time it takes to fill it. Assume that the rate of the flow of water into the pool is 70 gallons per minute, and a cubic foot of water has a capacity of 7.48 gallons. Constants that we need: FlowRate = 70 Capacity = 7.48 Input: length, width, depth (assume these are integers) Output: TimeInMin Formulas that we need: volume = length * width * depth poolCapacity = Capacity * volume timeInMin = poolCapacity / FlowRate Therefore, we also need to declare volume and poolCapacity as variables where we will store intermediate results. =============================================================================== Problem 2: Given the length and the width of a rectangular yard, and the length and the width of a rectangural house situated in this yard, write a program to compute the time required to cut the grass at the rate of 2 square meters per second. Assume that all input data are given in yards. Constants that we need: YardsToMeters = 0.8 Input: yardWidth, yardLength, houseWidth, houseLength (assume these are integers) Output: time needed to cut the grass, timeInMin Formulas that we need: yardArea = yardWidth * yardLength houseArea = houseWidth * houseLength grassArea = yardArea - houseArea grassAreaInSqM = grassArea * YardsToMeters timeInSec = grassAreaInSqM / 2 timeInMin = timeInSec / 60 Therefore, we also need to declare the following variables: yardArea, houseArea, grassArea, grassAreaInSqM, timeInSec, where we will store intermediate results.