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

  How could companies offering "free" products

The seminar uses Linux as an example of a company that understands competitive positioning. How can companies offering "free" products (e.g., Linux, Netscape) make money from these products? How can other companies compete with these fast-rising s..

  Developing the audio technologies

A company noting down the success of 24-bit digital audio technologies as compared to earlier 16-bit digital audio technologies has decided to work on developing the 28-bit digital audio technology.

  Local v/s network printers

Write down a paper explaining the Windows Printer Model for Server 2008. Explain the local v/s network printers and how to decide which printers to deploy.

  Comparing relative speed of lan and wan between sites

ABC Corporation employs 40,00 people along with their own associated IP addresses, and operates over the 400 serversDescribe how the relative speed of 100BaseT LANs used at each location is compared to accessing the WAN link between two sites.

  Explain the frame format of a typical ethernet packet

Explain how carrier sense multiple access with collision detection (CSMA/CD) works.

  What stack elements remain

suppose a stack-oriented processor that includes the stack operations PUSH and POP. Arithmetic operations automatically involve the top one or two stack elements. Begin with an empty stack.

  Security accounts manager

The security accounts manager (SAM) database consists of the information on all user profiles. User account set-up populates the database. Explain the fields and options linked with user account set-up.

  Reducing the cost per bit transmitted in lans or wans

Systematic and the logical storage of electronic files.specify if reducing the cost per bit transmitted more significant in the LANs or WANs.

  Algorithm for finding two closest numbers in the input list

plan an algorithm for finding two closest numbers in the input list. What is the time complexity? Is it possible to improve the algorithm if the input is a sorted list.

  Defining the class counter

Write down the definition of the class counter consisting of: An instance variable named counter of type int. A constructor which takes one int argument and allocates its value to the counter.

  Describes a function named insidecircle

Describes a function named insideCircle

  How to find the "smallest" and "largest" in a series of word

Write a program that finds the "Smallest" and "Largest" in a sequence of words. After user enter the words, the program will determine which words would come first and last if the words were listed in dictionary order.

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