Write a c program please follow instructions exactly this


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

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a c program please follow instructions exactly this
Reference No:- TGS02930548

Expected delivery within 24 Hours