Write a program for the standard deviation

Assignment Help Computer Engineering
Reference no: EM132137097

Write a C++ program. PLEASE FOLLOW INSTRUCTIONS EXACTLY. This program takes its inputs from a file that contains numbers. The program reads them in as type double. The program outputs to the screen the standard deviation of the numbers in the file. The file contains nothing but numbers of type double separated by blanks and/or line breaks. The standard deviation of a list of numbers x1, x2, x3, and so forth is defined as the square rootof:

((x1 - a)2 + (x2 - a)2 + (x3 - a)2 + ...) / (n - 1)

Where the number a is the average of the numbers x1, x2, x3, and so forth and the number n is the count of how many numbers there are.

Your program should take file name as input from the user. The answers should be given with 3 decimal points. Additionally, your program should define at least one function. If your program does NOT have at least one function, you will not get credit for this part of the assignment, even if your program passes submit.cs grading.

A session should look exactly like the following example (including whitespace and formatting - note that there is no whitespace at the end of each of these lines and each printed line has a newline at the end), with all manners of different numbers for inputs and the output:

Enter filename: nums.txt The standard deviation is 1.581

The accompanying input file in this example, could look like this (note the separation by one or more spaces):

6 7 8 9 10

or like this (note the separation by either spaces or newline characters):

6 7 8 9 10

 

Reference no: EM132137097

Questions Cloud

Shares of cumulative preferred stock outstanding : Dia Lucrii, Inc. has 325,000 shares of cumulative preferred stock outstanding. The stock is supposed to pay $2.18 in dividends per share each quarter.
Shares of cumulative preferred stock outstanding : Dia Lucrii, Inc. has 325,000 shares of cumulative preferred stock outstanding. The stock is supposed to pay $2.18 in dividends per share each quarter.
Create an assemblyline class : Create a ManufacturedProduct class. The ManufacturedProduct class is a simplified representation of a product that is being built on an assembly line.
Stock expected to grow after year 3 : At what constant rate is the stock expected to grow after Year 3? Round your answer to two decimal places. Do not round your intermediate calculations.
Write a program for the standard deviation : Write a C++ program. PLEASE FOLLOW INSTRUCTIONS EXACTLY. This program takes its inputs from a file that contains numbers.
Statements of the companies to make his investment decisions : Assume that your brother wants to buy shares of either Company A or B and is looking for your advice on how to use the financial
Financial health of the companies : Based on your review of the financial statements of Company A and B, suggest a key insight about the financial health of the companies.
Determine the enterprise value of company : 1) Assume that Company A wants to take-over Company B. Determine the enterprise Value of company B? Can Company A affo
Explain the positive effects of stereotypes on intercultural : They provide a shorthand way of dealing with differences and allowing us to categorize how people think about things and interact with our world.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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