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, 21.06.2019 22:00
3. (6 pts) internally in the computer, with few exceptions, all numerical computation is done using binary numbers. output, however, often uses ascii, which is formed by appending 011 to the left of a bcd code. thus, an algorithm that directly converts a binary integer to a bcd integer is very useful. here is one such algorithm 1) draw lines to the left of the binary number to bound the expected bcd decades. (each decade is a group of 4 bits.) move the binary number one bit to the left. add 0011 to each bcd decade containing a binary value> 0100 repeat steps 2-3 until the last bit in the binary number has been moved into the least significant decade position. (note that when the last bit has been shifted into bcd decade, step 3 is not repeated.) read the bcd result. 2) 3) 4) 5) a) execute the algorithm for the binary number 1101101 b) execute the algorithm for the binary number 01110101110 4. (4 pts) represent the decimal number 3568 in bcd; excess-3 code; ascil; and hex.
Answers: 1
question
Computers and Technology, 22.06.2019 03:00
You install teamviewer on your workstation at home so that you can ac ess it when on the road. how can you be assured that unknown users cant access your computer through team viewer?
Answers: 2
question
Computers and Technology, 22.06.2019 19:30
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
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
Mathematics, 03.10.2019 04:00
question
Mathematics, 03.10.2019 04:00
question
Mathematics, 03.10.2019 04:00
question
Social Studies, 03.10.2019 04:00
question
Social Studies, 03.10.2019 04:00
Questions on the website: 13722361