Question: In C++ 24. Average Rainfall Write a program that reads in from a file a starting month name, an ending month name, and the monthly
24. Average Rainfall Write a program that reads in from a file a starting month name, an ending month name, and the monthly rainfall for each month during that period. As it does this, it should sum the rainfall amounts and then displays the total rainfall and average monthly rainfall for the period. For example, the output might look like this: During the months of March-June: Total rainfall 7.32 inches Average monthly rainfall - 1.83 Inches. Data for the program can be found in the "Rainfall.txt" file. Moreover, the output data must also be stored in the file "Rain Report.txt". Hint: After reading in the month names, you will need to read in the rain amounts until the EOF if reached, and count how many pieces of rain data you read in. 75 Prison Home 18 End Pgup & 5 6 7 8 co 0 . Y 0 P
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
