Write a program that lets the user enter the total rainfall

Assignment Help C/C++ Programming
Reference no: EM131627296

Assignment: C++ Rainfall

This program will be a modification of the program done in CISS 241, Week 7 Programming Assignment. That was the Rainfall Statistics program. For those who did not take 241, that program description is below. Modify the Rainfall Statistics program so that it displays a list of months, sorted in the order of rainfall from highest to lowest.

Write a program that lets the user enter the total rainfall for each of 12 months into an array of doubles. The program should use two 12 element arrays. One array will hold strings, the names of the 12 months. This array will be initialized when the array is created using an initialization list (could also be created as a array of constants). The second array will hold doubles which will be the total rainfall for each month. The program will prompt the user for the rainfall for each month (using both arrays) and store the value entered into the array with the rainfall totals, the other is used to display which month the program is asking for the rainfall total. The program should display the following once the data is all entered:

• The total rainfall for the year
• The average monthly rainfall
• The month with the highest amount of rainfall (must display the month as a string)
• The month with the lowest amount of rainfall (must display the month as a string)

The program must have the following functions:

• double getTotal(double [ ], int);
• double getAverage(double [ ], int);
• double getLowest(double [ ], int, int&); //returns the lowest value, provides the index of the lowest value in the last parameter.
• double getHighest(double [ ], int, int&); //returns the highest value, provides the index of the highest value in the last parameter.

Reference no: EM131627296

Questions Cloud

Write a program that determines if the user is a winner : Write a program that determines if the user is a winner in the lottery game. A lottery ticket buyer purchases 10 tickets a week, always playing the same 10 5-di
Solve case of the nick fitzgerald : Nick Fitzgerald holds a well-diversified portfolio of high-quality, large-cap stocks. The current value of Fitzgerald's portfolio is $735,000.
Describe the need for internet filtering and identify : What steps would you take to reduce the risks to an organisation's information security?
What will happen to fabrizio profit if price of stock rises : Fabrizio just bought 1,000 shares of Intesa Sanpaolo Bank at €2.51 (Euro). He wants to write a covered call on the stocks to increase his profits.
Write a program that lets the user enter the total rainfall : Write a program that lets the user enter the total rainfall for each of 12 months into an array of doubles. The program should use two 12 element arrays.
Calculate price of put option on the same underlying stock : A call option on a bank with a strike price of €16 (Euro) expires in one year and has a current price of €2.5. The market price of the underlying stock.
Draw stuff enough to show you made an effort to use the apii : Graphics to draw stuff, enough to show you made an effort to use the API (or JavaDoc) documentation. Do not use some logo you didn't create yourself.
What is the call holder profit : A six-month call option contract on 100 shares of Home Depot common stock with a strike price of $60 can be purchased for $600.
What is the intrinsic value of the option : Twitter is trading at $34.50. Call options with a strike price of $35 are priced at $2.30. What is the intrinsic value of the option?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create a boolean function that computes

Create a Boolean function that computes the value of a factorial for values up to including 10. Include comments about how to use the function and describing how it works.

  Program for how to indicate the family member entry

Program for how to indicate the family member entry is complete

  Create a class called collegecourse and explain it

Average()- a function template that will accept two arguments(HonorPoints of the same data type) and computes the average of two HonorPoints

  Programming problem for weight conversion

Write a program that prompts the user to enter the mass of a person in kilograms and outputs the equivalent weight in pounds. Output both the mass and the weight rounded to two decimal places.

  Write a program to determine the cost of painting a room

implement the program to find the cost of painting a room - Write a program to determine the cost of painting a room.

  Program to declare array alpha of components of type int

Write C++ statements to do the following: Declare an array alpha of 15 components of the type int. Output the value of the tenth component of the array alpha.

  Write some code that will create a stream named out stream

Write some code that will create a stream named out Stream that is a member of the class Print Writer, and that connects this stream to a text fi le named.

  Preparing a high level language program

Describe the purpose of each step in preparing a high level language program for execution (editing, compiling, linking, and loading).  Include in your description the types of files created with each of the first three steps.?

  What is the output of the following code

What is the output of the following code?

  Afunction that raises an integer to a positive integer

Write a function that raises an integer to a positive integer power. Call the function x_to_the_n, taking two integer arguments x and n.

  Undirected graph has scanning tree

undirected graph has scanning trees. The minimal scanning tree is the scanning tree with the minimal sum of weights on edges. The minimal scanning tree can be found by using Prim's algorithm

  Calculate the distance in nautical miles using given formula

In this assignment, you will ask the user to enter two coordinates (Lat1, Long1, Lat2, Long2) and you will calculate the distance in nautical miles using the formula above.

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