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

  Variables reduce unnecessary comparision in a bubble sort

when merging 2 files, what condition terminates the main loop of the program.What type of variables can be used to reduce unnecessary comparision in a bubble sort.

  Deploying the 4-to-16 decoder

Develop the 4-to-16 decoder utilizing these elements. You should not utilize any additional elements.

  Complete handover of change management

How much control will you expect the Project Manager to have over planned changes, in projects where work has been extensively outsourced to external contractors? Full or partial control, or a complete handover of change management responsibility ..

  Dtproperties and sysdiagrams

Exclude the tables “dtproperties” and “sysdiagrams”. List the column CountOfTable, in which the Table is the chosen table name.

  Define the performance of your sql server 2000 installation

What could be done within the database itself to increase performance? Be sure to cite your sources.

  Printing of fibonacci series

Write down a program which utilized a loop to determine the first seven values of Fibonacci number sequence explained by the following formula.

  How to use ms access and create a database

How to use MS Access and create a database

  Consider database security from a variety of perspectives

Share experiences have you had in terms of user security in past jobs or as a student? Do you feel the user security was effective in those situations? What will you have done differently in light of what you've learned about data security.

  Application showing sizes of two files and their ratio

Build a file which consists of your favourite movie quote. Make a use of a text editor like Notepad and save file as Quote.txt. Copy contents of the file and paste them into the word-processing program like Word. Save file as Quote.doc. Write down..

  Assume that we compare the insertion sort method

assume that we compare the insertion sort method. while classification with merge requires 64n*lg(n) steps. For which values of n, does insertion sort method outclass the merge sort process.

  Write a program that reads n positive numbers from keyboard

Write a program that reads N Positive numbers from keyboard

  What will be formula of digital certificate of the server

Point out what will be the formula of digital certificate of the server N. we denote the public and private keys of server N as K+ ,N KN, and public or private keys of CA are denoted as K+ CA KCA.

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