Question: Find the c++ code Rainfall analysis The goal is to write a complete Ctt program to analyze monthly rainfall data. The data we'll use is
Rainfall analysis The goal is to write a complete Ctt program to analyze monthly rainfall data. The data we'll use is from Chicago's Midway airport, but the data could be from any location. The file format consists of an information row, followed by N > 0 rows of data. For example, here's the contents of the input file midway-1.txt: Chicago Midway Airport 2015 2017 2015 1.23 0.24 0.482.94 4.13 4.37 2.25 3.46 4.97 1.59 4.14 5.40 20160.65 0.21 3.05 2.50 5.56 1.56 4.95 6.42 1.19 4.22 1.66 1.25 2017 2.65 2.40 4.18 6.27 3.772.60 4.23 1.90 0.56 5.98 2.33 0.17 ubuntu/workspace/projectes/maim.cpp Each data row starts with an integer year, followed by 12 real numbers denoting the inches of rainfall for each month (Jan, Feb, .", Dec). The program analyzes this data and outputs the following: chicage. Midwny Alrport 20152927 Analysis Progran Average by year Cinches): 1. The average rainfall for each year 025 93333 2926: 2.76833 (-) Trends674,-1 2. The trend ( -,-,+, ++) as compared to the previous year 3. The average rainfall for each month (across all years) 4. The maximum rainfall amount and date 5. The minimum rainfall amount and date Avarage by month (nches): Jan: 1.5 b: .95 Par: 2.57 r: 3.98333 ay: 4.48667 An example program execution is shown to the right, analyzing the2.94533 file midway-1.txt. Notice that the filename is provided by the user at the keyboard Sep: 2.24 Oct: 3.93 Nov: 2.71 Dec: 2.27333 imum rainfall: 6.42 inches on Aug 2916 Rinimm rainfall: 0.17 inchas on Dec 2817 e Done . Page I of 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
