A fixed percentage of water is taken from a well each day. Write a C++ program...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A fixed percentage of water is taken from a well each day. Write a C++ program that request values for W and P where: ▪ W is the amount (in litres) of water in the well at the start of the first day ▪ P is the percentage of the water in the well taken out each day The program must print the number of the day, the amount taken for that day and the amount remaining at the end of the day. The output should be terminated (stopped) when 30 days have been printed or the amount of water remaining is less than 100 litres, whichever comes first. For example, if W = 1000 and P = 10, the output should start as follows: Day 1 2 3 Amount 100 90 81 Taken Amount 900 810 729 Remaining A fixed percentage of water is taken from a well each day. Write a C++ program that request values for W and P where: ▪ W is the amount (in litres) of water in the well at the start of the first day ▪ P is the percentage of the water in the well taken out each day The program must print the number of the day, the amount taken for that day and the amount remaining at the end of the day. The output should be terminated (stopped) when 30 days have been printed or the amount of water remaining is less than 100 litres, whichever comes first. For example, if W = 1000 and P = 10, the output should start as follows: Day 1 2 3 Amount 100 90 81 Taken Amount 900 810 729 Remaining
Expert Answer:
Related Book For
Posted Date:
Students also viewed these mechanical engineering questions
-
A vertical flat plate is maintained at a constant temperature of 120oF and exposed to atmospheric air at 70oF. At a distance of 14 in. from the leading edge of the plate the boundary layer thickness...
-
A 12.5 cm-diameter duct is maintained at a constant temperature of 260oC by hot combustion gases inside. The duct is located horizontally in a small warehouse area having an ambient temperature of...
-
A gas is compressed at a constant temperature. What happens to the mean free path of the molecules in this process?
-
Given the following set of slope staking notes: C Sta 51+00 50+00 49+00 L CX 33.4 F 9.1 33.6. F 10.3 35.4 C 5.5 0.0 F 3.5 R C 3.2 X C 4.1 30.2 0.0 20.0 Bases Base for cut=48 ft Base for fill= 40 ft s...
-
1 How do you split your time between tradition television and streaming video? 2. How might consumers use heuristics when choosing television shows to watch on Netflix? Viewing needs and preferences...
-
Suggest two reasons why in pre-industrial times there was no need for entities to have a management accounting system.
-
You need to understand the approach described in question 3 in More Genetic TIPS before answering this question. A gene that is normally expressed in pancreatic cells was cloned and then subjected to...
-
Recognition of Profit, Percentage-of-Completion In 2010 Gurney Construction Company agreed to construct an apartment building at a price of $1,200,000. The information relating to the costs and...
-
Jobs R Us, Inc. Is a recruiting firm that specializes in post- college placement in the finance industry. Its clients are currently concentrated in the North-Eastern United States lt is contemplating...
-
The table below shows Crystal's total cost of producing different quantities of tie-dyed t-shirts for a local arts festival. Instructions: Enter your answers as a whole number. a. Complete the...
-
The spotlight#2 the recommended BIA components through analyzing the spotlight 2 components I would purpose is that getting your methodology around each and every clinical application and structure...
-
A bill for $1,800 was received and recorded in the next month from Pacific Marketing for advertising placed in the current month. Create a new liability account like you did in the chapter. (Note:...
-
Centennial Brewery produced revenues of $1,152,650 in 2020. It has cost of goods sold and operating expenses (excluding depreciation) of $896,601, depreciation of $131,962, and interest expense of...
-
A buyer makes an offer to purchase and leaves a deposit with the listing broker to show good faith. When the contract is accepted, how should the broker handle the earnest money?
-
What is the main difference between short-term and long-term saving goals?
-
Reilly and Mac are married and file a joint tax return. Neither of them has a retirement plan at work. Their total income is $150,000. If Mac contributes $6,000 to an IRA and Reilly contributes...
-
Pick any 3 of the Types of Nonverbal Communication to write about. Relate each type of nonverbal communication to an experience that has either helped or hindered you while communicating and...
-
Why do CPA firms sometimes use a combination of positive and negative confirmations on the same audit?
-
For the reaction carried out at some fixed temperature, the equilibrium constant is 2.0. a. Which of the following pictures correctly depicts the reaction mixture at equilibrium? b. For the pictures...
-
Arrange the following compounds in order of increasing boiling point. (b) (a) (d) (c)
-
Because known compounds with NI bonds tend to be unstable, there are no thermodynamic data available with which to calculate the NI bond energy. However, we can estimate a value from Paulings formula...
-
Decide whether the system in Problem 4 is stable. A linear dynamic system is stable if the homogeneous solution of its mathematical model, subjected to the prescribed initial conditions, decays. More...
-
Perform the indicated operations, if defined, for the following vectors and matrices. \(\left(\mathbf{B}-\mathbf{v} \mathbf{w}^{T} ight) \mathbf{A}\) -2 1 -3 1 1 A = 1 -3 2 1 32 B = V= W = 0 0 4 5
-
Perform the indicated operations, if defined, for the following vectors and matrices. \(\left(\mathbf{A B}^{T} ight) \mathbf{v}\) -2 1 -3 1 1 A = 1 -3 2 1 32 B = V= W = 0 0 4 5
Study smarter with the SolutionInn App