How to compute both the average

Assignment Help Computer Engineering
Reference no: EM1331858

Write a program that declares a vector of real numbers and input values until a 0 is entered. Add the values to the vector by using push_back(), and compute both the average and the maximum value of the numbers. Output the average and the maximum.

Use the upcoming statements that intialize max to have the value -infinity. The first real number entered will become the new maximum.

double zero = 0.0;
//start max at -infinity
double max = -1.0/zero;

Reference no: EM1331858

Questions Cloud

Explain ecommerce strategy for apple : Explain ecommerce strategy for apple
Program calculates and displays the mortgage payment amount : make a procedural C++ program that calculates and displays the mortgage payment amount that will display mortgage amount, the term of the mortgage, and the interest rate of the mortgage.
Workforce score card : Workforce Score Card - What does it take to be successful in determining the return on investment (ROI) of HR proposals?
Finding effective alternative dispute resolution : Analyze the methods of alternative dispute resolution and determine which is the most effective in resolving genuine disputes.
How to compute both the average : Write down a program that declares a vector of real numbers and input values until a 0 is entered. Add the values to the vector by using push_back(), and compute both the average and the maximum value of the numbers. Output the average and the max..
Explain first mover advantage for amazon : Explain first mover advantage for amazon
Computing balance sheet after dividends are paid : What will it sell for tomorrow? What will the balance sheet look like after the dividends are paid?
Briefing at work based on these questions : We are having a briefing at work based on these questions - Many believe that from a strategic perspective, HR needs to have a seat at the big table in today's organizations.
Program that uses class to create many fields : write a program that uses class to create many fields.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Program that continuously outputs random numbers

Write down a code in Java that continuously outputs random numbers between 0 and 10000 until a number which is divisible by 5 is encountered.

  Describe component method to draw the current value

Write down a program that uses the paint component method to draw the current value of a JSlider on a subclass of JPanel.

  Design the function "count" which takes a list of items

design the function "count" which takes a list of items and an item as arguments, and returns the number of times the item occurs in the list.

  Create a shadow on phrase html5 canvas

Create a shadow on phrase "HTML5 Canvas"

  How a box of caramel delites girl scout cookies

How to a box of Caramel deLites Girl Scout cookies Every spring you looking forward to buying a box of Caramel deLites Girl Scout cookies

  What advice or guidance would offer a company

In times of financial difficulty, companies often resort to trimming the human asset base, without proper prior analysis of the long-term impacts of those actions.

  Find the average number of miles per gallon

design a class named Vehicle that acts as a superclass of vehicle types. The Vehicle class contains private variable fo rthe number of wheels and the average number of miles per gallon.

  Application for verifying pin number

The National Commerce Bank has hired you to generate an application which verifies a customer personal identification number (PIN).

  Removing the ambiguities in algorithms representation

Explain how the use of primitives helps in removing the ambiguities in an algorithm’s representation?

  Write a java program on a good doctor

Write a java program on A good Doctor

  Explain the situation in terms of pci compliance standard

On your exit, a store employee asks to give your receipt and checks all the contents of the store bag. Document each of the above described events that are described and explain them in terms of PCI compliance standard.

  Tools that help in the attack

When initially collecting the information on a network, that reconnaissance tool or method do you believe would generate the best results include what information could you learn utilizing this tool or method and how could this information be used..

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