Calculate the average rainfall over a period of years

Assignment Help Basic Computer Science
Reference no: EM131236380

Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period. Input Validation: Do not accept a number less than 1 for the number of years. Do not accept negative numbers for the monthly rainfall.

Reference no: EM131236380

Questions Cloud

Write a two page opinion paper on keeping prisoners : Write a two page opinion paper on keeping prisoners at Guantanamo Bay. What is the purpose? Should these prisoners be given the same rights as American citizens? Should they be given the right of "habeas corpus?"
Write program that calculates the occupancy rate for a hotel : The percentage may be calculated by dividing the number of rooms occupied by the number of rooms.
How does hamburger university support mission of mcdonalds : How does Hamburger University support the mission of McDonalds? Name at least five ways and discuss. Find McDonald's mission statement, values and goals, and provide the URL.
Calculate the maximum fanout : In the TTL circuit in Figure, the transistor parameters are βF = 20 and βR = 0.10. - Calculate the maximum fanout for vX = vY = 5 V. - Calculate the maximum fanout for vX = vY = 0.1 V.
Calculate the average rainfall over a period of years : Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years.
Find a stable state in a hopfield neural network : Consider the problem of finding a stable state in a Hopfield neural network, in the special case when all edge weights are positive. This corresponds to the Maximum-Cut Problem that we discussed earlier in the chapter: For every edge e in the grap..
Program to let the user enter a series of integers : Write a program with a loop that lets the user enter a series of integers. The user should enter -99 to signal the end of the series. After all the numbers have been entered, the program should display the largest and smallest numbers entered.
Which type of audit is the least complicated for taxpayers : Which type of audit is the least complicated for taxpayers? A $2,000 deposit to a tax-deferred retirement account for a person in a 25 percent tax bracket would result in a reduced tax bill of.
People of britain think of the empire of that time : What did the people of Britain think of the Empire of that time?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Describes the internet protocol and includes two options

RFC 791 describes the Internet Protocol and includes two options for source routing. Describe three disadvantages of using IP source route options compared to using MPLS for explicit routing.

  Carrying and using in five years

Walt asks each of them what they imagine they will be carrying and using in five years, what do you think you will be working on primarily five years from now?  What will this device look like?

  Difference in actual authority

Be sure to identify and discuss all agency issues, including (i) the difference in actual authority, apparent authority and ratification, (ii) whether Ann is liable for the contract for the cow and under what theory, and (iii) whether Ann is liabl..

  What is a function prototype

What is a function prototype?

  Techniques for reading or writing files in php

1. Describe two techniques for reading or writing files in PHP. 2. Why we need to always sanitize user inputs before using them in your queries?

  Re-create the diagram provided in the assignment summary

Re-create the diagram provided in the assignment summary using VLSM, through the use of graphical tools in Microsoft Visio or an open source alternative such as Dia. (The starting address is 172.16.0.0.) Note: The graphically depicted solution is ..

  Loop through the array to determine

Loop through the array to determine if the first name entered exists in the array. If a match is found, display a message that includes the name and a message indicating that there was a match found. If no match is found, display a message so indi..

  Unexpected events including network security event

"Disaster recovery plans in case of earthquakes, fires, hurricanes, asteroids that collide with satellites, or other natural or man-made disasters." Many companies have a "risk action plan" to handle unexpected events including network security ev..

  How many ounces of solid food did stacie consume

For the noon meal today she ate 1/2 of a 3 ounce serving of meatloaf, 3/4 of her 3 ounce serving of mashed potatoes, and 1/3 of a 2 ounce serving of green beans. How many ounces of solid food did Stacie consume.

  Ignore a fast recovery when packet is lost

Give a table showing, for the first 15 seconds, what A receives, what A sends, what R sends, R's queue, and what R drops.

  Determine the max profit in dollars

Determine the number of luxury cars that must be produced and sold to obtain the max profit Determine the max profit in dollars

  The right-hand side of this equation be written in vba

How would the right-hand side of this equation be written in VBA?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd