Question: can anyone explain what i am doing wrong? i keep running into a error at month[indexOfHighest] and i can't seem to figure out how

 can anyone explain what i am doing wrong? i keep running

into a error at "month[indexOfHighest] " and i can't seem to figure

out how to make it go away? also if yall can be

so kind and finish the code up for me please?? i tried

can anyone explain what i am doing wrong? i keep running into a error at "month[indexOfHighest] " and i can't seem to figure out how to make it go away?

also if yall can be so kind and finish the code up for me please?? i tried but i got stuck when i couldn't figure out line 42.

in c++ please.

Write a program that reads in the rainfall for each of 12 months and outputs the month and the rainfall for the month. It should then output the month with the most rainfall, the month with the least rainfall, the total amount of rainfall for the year, and the average monthly rainfall. All rainfall amounts should be output with 2 significant digits after the decimal point. - The program should incorporate two parallel arrays: month of type string containing the month names, and rainfall of type double containing the rainfall in inches for the corresponding month. Hint: Check slides 8 thru 10 of CS1336_Lect7c_Arrays_Compare_Parallel.pptx for examples. - The program should read in the rainfall amount for each month using a for loop. Do not accept negative numbers for rainfall amount. - The program should output the month right justified in a field width of 10 and the corresponding rainfall right justified in a field width of 6. - The program should calculate the highest and lowest amounts of rainfall and display the amounts and the corresponding month names. It should also output the index of the highest and lowest rainfall amounts. Hint 1: Check slides 3 and 4 of CS1336_Lect7c_Arrays_Compare_Parallel.pptx for the code to find the lowest and the highest. Hint 2: In addition, you will have to keep track of the index at which you found the highest and the lowest amount. Output the month name corresponding to the index. For example, if rainfall [3] is the lowest rainfall, you will print month [3] as the corresponding month. - The program should calculate and display the total rainfall for the year and the average monthly rainfall. Hint: Make use of an accumulator in your loop. - Validation: Do not accept negative numbers for monthly rainfall figures. I will be grading this lab with a script. If you do not use parallel arrays and do not find and use the index of the lowest and index of the highest, you will NOT receive credit. I will change your grade in Blackboard to reflect this. When the input is as shown in Figure 1, your program should produce the output as shown in Figure 2. Figure 1: (input) Figure 2: (output) The most rainfall was 5.90 inches in September. This is at index 8. The least rainfall was 0.24 inches in May. This is at index 4 . The total amount of rainfall for the year is 20.15 inches. The average monthly rainfall for the year is 1.68 inches. 457265.2740000.cx 3z7 7.4.1: Lab 45: Rainfall Statistics 0/10 I/ variables Program errors displayed here

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 Databases Questions!