Computers and Technology

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:

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 19:30, bbgirl8638
Of the following pieces of information in a document, for which would you most likely insert a mail merge field?
Answers: 3
image
Computers and Technology, 23.06.2019 20:30, batmandillon21
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
image
Computers and Technology, 24.06.2019 07:30, LuckyCharms988
Consider the folloeing website url: what does the "http: //" represent? a. protocal identifier. b. ftp. c. domain name d. resource name
Answers: 2
image
Computers and Technology, 24.06.2019 12:00, exoticbunnylover123
Which spreadsheet operation does a look function perform?
Answers: 1
Do you know the correct answer?
Write a program that lets the user enter the total rainfall for each of 12 months (starting with jan...

Questions in other subjects:

Konu
Health, 27.07.2020 01:01