Written in C# Language Please! A fixed percentage of water is taken from a well each day. 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 Write a program to 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 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:
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Written in C# Language Please!
A fixed percentage of water is taken from a well each day.
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
Write a program to 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 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 |
Amount Taken |
Amount Remaining |
1 |
100 |
900 |
2 |
90 |
810 |
3 |
81 |
729 |
Note: The amount taken and amount remaining should be displayed to 2 decimal places.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images