Write a C++ program for:
Problem #4: There are many dams in Lebanon. The Faraya-Chabrouh Dam is a dam above the village of Faraya, Lebanon.
LARI (the Lebanese Agriculture Research Institute) wants to calculate the total precipitation per month (rainfall amount per month in mm) in order to control the flow of water of the Dam.
You are asked to write a C++ program that takes the daily amount of rainfall (in mm) over a whole month. Maybe not all the days are rainy, so the user enters 0 for these days. Use a one-dimensional array to store all the values (assume a month contains 30 days).
The program must output the total monthly precipitation and compare it to the annual average rainfall entered by the user at the start of the program (in mm), in order to calculate and output the amount of water that must be released from the dam to avoid damage.
In case the monthly precipitation is bigger than the annual average, 20% of water must be released from the huge water reservoir. If the precipitation falls between 200 mm and the annual average, 10% of water must be released; otherwise, 5% of water must be released.
You are asked to output the maximum and minimum precipitations during this month at the end of your program.