subject

Write a program to track and display rainfall for each month for 5 years (2010 - 2014).
Use a 2 dimensional array to store the rainfall for each month (5 rows (for the years) and 12 columns (for the months)).

Using an initializer list, populate the array with the below data.
Display the table of the rainfall values for the 5 years and 12 months (as shown below). Then, total and display the rainfall for each year, and calculate and display the average rainfall for each month.
Hint: When totaling the rainfall for each month (to calculate the average), use an outer loop to loop through the months first, and an inner loop to loop through the years.

There is nothing entered by the user.

Exactly how output should look:

Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
2010 0.88 1.11 2.01 3.64 6.44 5.58 4.23 4.34 4.00 2.05 1.48 0.77
2011 0.76 0.94 2.09 3.29 4.68 3.52 3.52 4.82 3.72 2.21 1.24 0.80
2012 0.67 0.80 1.75 2.70 4.01 3.88 3.72 3.78 3.55 1.88 1.21 0.61
2013 0.82 0.80 1.99 3.05 4.19 4.44 3.98 4.57 3.43 2.32 1.61 0.75
2014 0.72 0.90 1.71 2.02 2.33 2.98 2.65 2.99 2.55 1.99 1.05 0.92

Total rainfall for each year:
2010 xx. xx
2011 xx. xx
2012 xx. xx
2013 xx. xx
2014 xx. xx

Average rainfall for each month:
Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
x. xx x. xx x. xx x. xx x. xx x. xx x. xx x. xx x. xx x. xx x. xx x. xx

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:50
In this lab, you complete a prewritten c++ program for a carpenter who creates personalized house signs. the program is supposed to compute the price of any sign a customer orders, based on the following facts: the charge for all signs is a minimum of $35.00. the first five letters or numbers are included in the minimum charge; there is a $4 charge for each additional character. if the sign is made of oak, add $20.00. no charge is added for pine. black or white characters are included in the minimum charge; there is an additional $15 charge for gold-leaf lettering. instructions ensure the file named housesign.cppis open in the code editor. you need to declare variables for the following, and initialize them where specified: a variable for the cost of the sign initialized to 0.00 (charge). a variable for the number of characters initialized to 8 (numchars). a variable for the color of the characters initialized to "gold" (color). a variable for the wood type initialized to "oak" (woodtype). write the rest of the program using assignment statements and ifstatements as appropriate. the output statements are written for you. execute the program by clicking the run button. your output should be: the charge for this sign is $82. this is the code, // housesign.cpp - this program calculates prices for custom made signs. #include #include using namespace std; int main() { // this is the work done in the housekeeping() function // declare and initialize variables here // charge for this sign // color of characters in sign // number of characters in sign // type of wood // this is the work done in the detailloop() function // write assignment and if statements here // this is the work done in the endofjob() function // output charge for this sign cout < < "the charge for this sign is $" < < charge < < endl; return(0); }
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
The three logical operators used to write compound conditions are "and," "or," and "not." a: true b: false
Answers: 2
question
Computers and Technology, 23.06.2019 12:20
When guido van rossum created python, he wanted to make a language that was more than other programming languages. a. code-based b. human-readable c. complex d. functional
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. which step can possibly increase the severity of an incident? a. separating sensitive data from non-sensitive data b. immediately spreading the news about the incident response plan c. installing new hard disks d. increasing access controls
Answers: 2
You know the right answer?
Write a program to track and display rainfall for each month for 5 years (2010 - 2014).
Use a...
Questions
question
Mathematics, 23.11.2020 23:30
question
Mathematics, 23.11.2020 23:30
question
Health, 23.11.2020 23:30