Question: Write a C++ program that reads the amount of rainfall in inches for each month of one-year from a file into an array. The file
Write a C++ program that reads the amount of rainfall in inches for each month of one-year from a file into an array. The file is named "rainfall.dat" and has 12 value, one for each month. (i.e. 5.92). After all of the values have been input, the program should calculate and output the following two statistics, with labels: a. the total amount of rainfall for the year
b. which month has the highest rainfall (output the number, 1 for Jan, 2 for Feb, etc)
Please help with this quick problem! I want to make sure I'm doing this correctly.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
