Question: Problem statement: Average rainfall In the data files attached below, monthly rainfall data for Vancouver is given in mm from year 2017 to 2021. Each

 Problem statement: Average rainfall In the data files attached below, monthly

Problem statement: Average rainfall In the data files attached below, monthly rainfall data for Vancouver is given in mm from year 2017 to 2021. Each file contains 12 lines. On each line there is a floating-point value. First line represents rainfall measured in Vancouver during January. Second line for February, and so on. Write a program that uses nested loops to read data from files and calculate some summarized values over a period of five years. The outer loop will iterate once for each year. The inner loop will iterate 12 times, once for each month. Each iteration of the inner loop will do necessary calculations. The outer loop should show the yearly average rainfall and maximum monthly rainfall value for each year. The program should display summarized data for five years as follows: Year Monthly average rainfall Ma 2017 97.7 19 2018 110.5 25 2019 77.8 16 2020 89.3 22 2021 94.7 31 Bonus question that is worth 20 points: On the output, show in which month maximum rainfall has happened. The output of your program with solution to bonus question should be as follows

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!