Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A fixed percentage of water is taken from a well each day. Write a C++ program that request values for W and P where:

A fixed percentage of water is taken from a well each day. Write a ( mathrm{C}++ ) program that request values for ( mat 

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

Step by Step Solution

3.44 Rating (157 Votes )

There are 3 Steps involved in it

Step: 1

CODE include using na... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

General Chemistry

Authors: Darrell Ebbing, Steven D. Gammon

9th edition

978-0618857487, 618857486, 143904399X , 978-1439043998

More Books

Students also viewed these Mechanical Engineering questions

Question

1. Keep a reasonable distance.

Answered: 1 week ago