Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started