subject

Write a program that lets the user enter the total rainfall for each of 12 months (starting with january) into an array of doubles. the program should calculate and display (in this order):

the total rainfall for the year,
the average monthly rainfall,
and the months with the highest and lowest amounts.

months should be expressed as english names for months in the gregorian calendar, i. e.: january, february, march, april, may, june, july, august, september, october, november, december.

input validation: do not accept negative numbers for monthly rainfall figures. when a negative value is entered, the program outputs "invalid data (negative rainfall) -- retry" and attempts to reread the value.

prompts and output labels: decimal values should be displayed using default precision, i. e. do not specify precision. each item read should be prompted for by a string of the form "enter rainfall for month: " where month is "january" or "february" or or "december". the output should be of the form:

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x,y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documentation/point2d.html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Brian wants to conduct an online search with a certain phrase. he intends to use the words books that belong to the 1800s in his search. how should he use the word that in his search?
Answers: 1
question
Computers and Technology, 23.06.2019 22:30
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
You know the right answer?
Write a program that lets the user enter the total rainfall for each of 12 months (starting with jan...
Questions
question
English, 11.12.2020 01:50
question
Mathematics, 11.12.2020 01:50
question
Chemistry, 11.12.2020 01:50
Questions on the website: 13722363